mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -2903,7 +2903,7 @@ _PyEval_FormatExcUnbound(PyThreadState *tstate, PyCodeObject *co, int oparg)
|
|||
if (_PyErr_Occurred(tstate))
|
||||
return;
|
||||
name = PyTuple_GET_ITEM(co->co_localsplusnames, oparg);
|
||||
if (oparg < PyCode_GetFirstFree(co)) {
|
||||
if (oparg < PyUnstable_Code_GetFirstFree(co)) {
|
||||
_PyEval_FormatExcCheckArg(tstate, PyExc_UnboundLocalError,
|
||||
UNBOUNDLOCAL_ERROR_MSG, name);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue