Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b883310

Browse files
committed
Make _PyObject_GC_UnTrack do nothing if WITH_CYCLE_GC is not defined.
1 parent 95b62a6 commit b883310

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/gcmodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,11 @@ _PyObject_GC_Track(PyObject *op)
819819
void
820820
_PyObject_GC_UnTrack(PyObject *op)
821821
{
822+
#ifdef WITH_CYCLE_GC
822823
PyGC_Head *gc = AS_GC(op);
823824
if (gc->gc.gc_next != NULL)
824825
_PyObject_GC_UNTRACK(op);
826+
#endif
825827
}
826828

827829
PyObject *

0 commit comments

Comments
 (0)