There was an error while loading. Please reload this page.
1 parent 44d7dff commit 5b9176bCopy full SHA for 5b9176b
2 files changed
Python/gc.c
@@ -537,10 +537,10 @@ visit_decref(PyObject *op, void *parent)
537
int
538
_PyGC_VisitFrameStack(_PyInterpreterFrame *frame, visitproc visit, void *arg)
539
{
540
- _PyStackRef *i = frame->localsplus;
+ _PyStackRef *ref = _PyFrame_GetLocalsArray(frame);
541
/* locals and stack */
542
- for (; i < frame->stackpointer; i++) {
543
- Py_VISIT(PyStackRef_AsPyObjectBorrow(*i));
+ for (; ref < frame->stackpointer; ref++) {
+ Py_VISIT(PyStackRef_AsPyObjectBorrow(*ref));
544
}
545
return 0;
546
Python/gc_free_threading.c
@@ -954,7 +954,7 @@ visit_decref_unreachable(PyObject *op, void *data)
954
955
956
957
- _PyStackRef *ref = frame->localsplus;
958
959
for (; ref < frame->stackpointer; ref++) {
960
// This is a bit tricky! We want to ignore deferred references when
0 commit comments