From: Martin v. Löwis Date: Sat, 15 Apr 2006 12:46:09 +0000 (+0000) Subject: Fix sys.getobjects(0): we get a reference to the X-Git-Tag: v2.5a2~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=841747cb56c6eeee9d89e6003a355b3d6c4c7cc1;p=python Fix sys.getobjects(0): we get a reference to the arena's "private" list of objects, so there might be two references to that list. --- diff --git a/Python/pyarena.c b/Python/pyarena.c index 24a7374300..f11a90546b 100644 --- a/Python/pyarena.c +++ b/Python/pyarena.c @@ -171,7 +171,10 @@ PyArena_Free(PyArena *arena) */ #endif block_free(arena->a_head); + /* This property normally holds, except when the code being compiled + is sys.getobjects(0), in which case there will be two references. assert(arena->a_objects->ob_refcnt == 1); + */ /* Clear all the elements from the list. This is necessary to guarantee that they will be DECREFed. */