diff options
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c index 030afed..0f619c4 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1800,8 +1800,7 @@ compiler_class(struct compiler *c, stmt_ty s) { /* use the class name for name mangling */ Py_INCREF(s->v.ClassDef.name); - Py_XDECREF(c->u->u_private); - c->u->u_private = s->v.ClassDef.name; + Py_SETREF(c->u->u_private, s->v.ClassDef.name); /* load (global) __name__ ... */ str = PyUnicode_InternFromString("__name__"); if (!str || !compiler_nameop(c, str, Load)) { |