GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)

This commit is contained in:
Mark Shannon 2022-08-25 10:16:55 +01:00 committed by GitHub
parent 8db7693bbf
commit c09fa7542c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 13 deletions

View file

@ -13,7 +13,7 @@ _PyFrame_Traverse(_PyInterpreterFrame *frame, visitproc visit, void *arg)
{
Py_VISIT(frame->frame_obj);
Py_VISIT(frame->f_locals);
Py_VISIT(frame->f_func);
Py_VISIT(frame->f_funcobj);
Py_VISIT(frame->f_code);
/* locals */
PyObject **locals = _PyFrame_GetLocalsArray(frame);
@ -114,7 +114,7 @@ _PyFrame_Clear(_PyInterpreterFrame *frame)
}
Py_XDECREF(frame->frame_obj);
Py_XDECREF(frame->f_locals);
Py_DECREF(frame->f_func);
Py_DECREF(frame->f_funcobj);
Py_DECREF(frame->f_code);
}