summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 9ce8ac3..94a2715 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1551,6 +1551,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;
/* force it to have one mandatory argument */
c->u->u_argcount = 1;