Skip to content

Commit a83465f

Browse files
Do not call get_gc_state from inside loop in expand_region_transitively_reachable
1 parent 2456715 commit a83465f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCStat
13961396
assert(_PyObject_GC_IS_TRACKED(op));
13971397
if (_Py_IsImmortal(op)) {
13981398
PyGC_Head *next = GC_NEXT(gc);
1399-
gc_list_move(gc, &get_gc_state()->permanent_generation.head);
1399+
gc_list_move(gc, &gcstate->permanent_generation.head);
14001400
gc = next;
14011401
continue;
14021402
}

0 commit comments

Comments
 (0)