Kaydet (Commit) 36e6310e authored tarafından Neal Norwitz's avatar Neal Norwitz

Fix refleak with nested classes. Fix originally by Amaury in r62015.

üst f7276c9b
...@@ -1551,6 +1551,7 @@ compiler_class(struct compiler *c, stmt_ty s) ...@@ -1551,6 +1551,7 @@ compiler_class(struct compiler *c, stmt_ty s)
{ {
/* use the class name for name mangling */ /* use the class name for name mangling */
Py_INCREF(s->v.ClassDef.name); Py_INCREF(s->v.ClassDef.name);
Py_XDECREF(c->u->u_private);
c->u->u_private = s->v.ClassDef.name; c->u->u_private = s->v.ClassDef.name;
/* force it to have one mandatory argument */ /* force it to have one mandatory argument */
c->u->u_argcount = 1; c->u->u_argcount = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment