gh-115756: make PyCode_GetFirstFree an unstable API (GH-115781)

This commit is contained in:
Bogdan Romanyuk 2024-03-19 12:20:38 +03:00 committed by GitHub
parent a3cf0fada0
commit a8e93d3dca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 23 additions and 6 deletions

View file

@ -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);