Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 46240:5a17d157df00
Fix refleak with nested classes. Fix originally by Amaury in r62015.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Tue, 01 Apr 2008 08:08:09 +0000 |
| parents | 81ee270a6eb5 |
| children | b630729571e6 |
line wrap: on
line diff
--- a/Python/compile.c Tue Apr 01 07:38:41 2008 +0000 +++ b/Python/compile.c Tue Apr 01 08:08:09 2008 +0000 @@ -1551,6 +1551,7 @@ { /* 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;
