mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
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.
This commit is contained in:
parent
c597d1b446
commit
841747cb56
1 changed files with 3 additions and 0 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue