Skip to content

Commit 48a244d

Browse files
committed
Functions aren't needed for no-gil build
1 parent cb357f9 commit 48a244d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Objects/object.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,6 +2930,7 @@ Py_ReprLeave(PyObject *obj)
29302930

29312931
/* Trashcan support. */
29322932

2933+
#ifndef Py_GIL_DISABLED
29332934
/* We need to store a pointer in the refcount field of
29342935
* an object. It is important that we never store 0 (NULL).
29352936
* It is also important to not make the object appear immortal,
@@ -2954,6 +2955,7 @@ safe_refcount_to_pointer(uintptr_t refcnt)
29542955
}
29552956
return (void *)(refcnt - 2);
29562957
}
2958+
#endif
29572959

29582960
/* Add op to the gcstate->trash_delete_later list. Called when the current
29592961
* call-stack depth gets large. op must be a currently untracked gc'ed

0 commit comments

Comments
 (0)