diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/gcmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 71e9596..ed25bd4 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -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 * |