Skip to content

Commit 39639bf

Browse files
committed
Fix up FT GC
1 parent a5991bf commit 39639bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/gc_free_threading.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ gc_visit_heaps(PyInterpreterState *interp, mi_block_visit_fun *visitor,
420420
static inline void
421421
gc_visit_stackref(_PyStackRef stackref)
422422
{
423-
if (PyStackRef_IsDeferred(stackref) && !PyStackRef_IsNull(stackref)) {
423+
if (PyStackRef_IsDeferred(stackref) && !PyStackRef_IsNullOrInt(stackref)) {
424424
PyObject *obj = PyStackRef_AsPyObjectBorrow(stackref);
425425
if (_PyObject_GC_IS_TRACKED(obj) && !gc_is_frozen(obj)) {
426426
gc_add_refs(obj, 1);
@@ -805,7 +805,7 @@ gc_abort_mark_alive(PyInterpreterState *interp,
805805
static int
806806
gc_visit_stackref_mark_alive(gc_mark_args_t *args, _PyStackRef stackref)
807807
{
808-
if (!PyStackRef_IsNull(stackref)) {
808+
if (!PyStackRef_IsNullOrInt(stackref)) {
809809
PyObject *op = PyStackRef_AsPyObjectBorrow(stackref);
810810
if (gc_mark_enqueue(op, args) < 0) {
811811
return -1;

0 commit comments

Comments
 (0)