Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Usinggrep, I identified 3 instances inmain where code checks ifPy_EnterRecursiveCall(...) < 0 (which just returns_Py_EnterRecursiveCall(...)) or_Py_EnterRecursiveCall(...) < 0.
Py_EnterRecursiveCall()documentation only guarantees that anonzero value is returned in the event of an error.- The actual implementation can't return a negative value:
cpython/Include/internal/pycore_ceval.h
Lines 130 to 138 in7644935
| staticinlineint_Py_EnterRecursiveCallTstate(PyThreadState*tstate, | |
| constchar*where) { | |
| return (_Py_MakeRecCheck(tstate)&&_Py_CheckRecursiveCall(tstate,where)); | |
| } | |
| staticinlineint_Py_EnterRecursiveCall(constchar*where) { | |
| PyThreadState*tstate=_PyThreadState_GET(); | |
| return_Py_EnterRecursiveCallTstate(tstate,where); | |
| } |