mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).
The fix makes it possible to call PyObject_GC_UnTrack() more than once on the same object, and then move the PyObject_GC_UnTrack() call to *before* the trashcan code is invoked. BUGFIX CANDIDATE!
This commit is contained in:
parent
31f8483eef
commit
ff413af605
5 changed files with 7 additions and 5 deletions
|
|
@ -819,7 +819,9 @@ _PyObject_GC_Track(PyObject *op)
|
|||
void
|
||||
_PyObject_GC_UnTrack(PyObject *op)
|
||||
{
|
||||
_PyObject_GC_UNTRACK(op);
|
||||
PyGC_Head *gc = AS_GC(op);
|
||||
if (gc->gc.gc_next != NULL)
|
||||
_PyObject_GC_UNTRACK(op);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue