mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)
This commit is contained in:
parent
8db7693bbf
commit
c09fa7542c
6 changed files with 26 additions and 13 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue