mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -1830,7 +1830,7 @@ compiler_make_closure(struct compiler *c, location loc,
|
|||
PyCodeObject *co, Py_ssize_t flags)
|
||||
{
|
||||
if (co->co_nfreevars) {
|
||||
int i = PyCode_GetFirstFree(co);
|
||||
int i = PyUnstable_Code_GetFirstFree(co);
|
||||
for (; i < co->co_nlocalsplus; ++i) {
|
||||
/* Bypass com_addop_varname because it will generate
|
||||
LOAD_DEREF but LOAD_CLOSURE is needed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue