diff options
author | Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com> | 2024-03-19 12:20:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 09:20:38 +0000 |
commit | a8e93d3dca086896e668b88b6c5450eaf644c0e7 (patch) | |
tree | 4de06c7d1f39d9fb7aa8b3ef8306aa73bb09ed60 /Objects | |
parent | a3cf0fada09b74b1a6981cc06c4dd0bb1091b092 (diff) | |
download | cpython-a8e93d3dca086896e668b88b6c5450eaf644c0e7.tar.gz cpython-a8e93d3dca086896e668b88b6c5450eaf644c0e7.zip |
gh-115756: make PyCode_GetFirstFree an unstable API (GH-115781)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/frameobject.c | 2 | ||||
-rw-r--r-- | Objects/typeobject.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index a914c61aac2..d55c246d80d 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -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); diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 24f31492985..06c2fc8e6ca 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -10884,7 +10884,7 @@ super_init_without_args(_PyInterpreterFrame *cframe, PyCodeObject *co, // Look for __class__ in the free vars. PyTypeObject *type = NULL; - int i = PyCode_GetFirstFree(co); + int i = PyUnstable_Code_GetFirstFree(co); for (; i < co->co_nlocalsplus; i++) { assert((_PyLocals_GetKind(co->co_localspluskinds, i) & CO_FAST_FREE) != 0); PyObject *name = PyTuple_GET_ITEM(co->co_localsplusnames, i); |