Mercurial > cpython-lru_cache-weakref
diff Python/pyarena.c @ 37746:636ca80a8cbe legacy-trunk
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.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 15 Apr 2006 12:46:09 +0000 |
| parents | ac79e9037e06 |
| children | 12e973bdfeee |
line wrap: on
line diff
--- a/Python/pyarena.c Sat Apr 15 12:45:05 2006 +0000 +++ b/Python/pyarena.c Sat Apr 15 12:46:09 2006 +0000 @@ -171,7 +171,10 @@ */ #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. */
