diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index ed25bd4fec8..d98e6a12fed 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -819,9 +819,11 @@ _PyObject_GC_Track(PyObject *op) void _PyObject_GC_UnTrack(PyObject *op) { +#ifdef WITH_CYCLE_GC PyGC_Head *gc = AS_GC(op); if (gc->gc.gc_next != NULL) _PyObject_GC_UNTRACK(op); +#endif } PyObject *