mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-115756: make PyCode_GetFirstFree an unstable API (GH-115781)
This commit is contained in:
parent
a3cf0fada0
commit
a8e93d3dca
8 changed files with 23 additions and 6 deletions
|
@ -1140,7 +1140,7 @@ frame_init_get_vars(_PyInterpreterFrame *frame)
|
|||
|
||||
/* Free vars have not been initialized -- Do that */
|
||||
PyObject *closure = ((PyFunctionObject *)frame->f_funcobj)->func_closure;
|
||||
int offset = PyCode_GetFirstFree(co);
|
||||
int offset = PyUnstable_Code_GetFirstFree(co);
|
||||
for (int i = 0; i < co->co_nfreevars; ++i) {
|
||||
PyObject *o = PyTuple_GET_ITEM(closure, i);
|
||||
frame->localsplus[offset + i] = Py_NewRef(o);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue