]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-137084: remove multiple calls to `get_gc_state` in `gc.c` (#137085)
authorSergey Miryanov <sergey.miryanov@gmail.com>
Fri, 25 Jul 2025 12:43:54 +0000 (05:43 -0700)
committerGitHub <noreply@github.com>
Fri, 25 Jul 2025 12:43:54 +0000 (18:13 +0530)
Python/gc.c

index 255362705233056a7bc92b32842e3a7b4aeca2dc..2e697faac032b5972d8714539ebb9d504f150aba 100644 (file)
@@ -1396,7 +1396,7 @@ expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCStat
         assert(_PyObject_GC_IS_TRACKED(op));
         if (_Py_IsImmortal(op)) {
             PyGC_Head *next = GC_NEXT(gc);
-            gc_list_move(gc, &get_gc_state()->permanent_generation.head);
+            gc_list_move(gc, &gcstate->permanent_generation.head);
             gc = next;
             continue;
         }