Message368150
Python/ceval.c also has "int _Py_CheckRecursionLimit = Py_DEFAULT_RECURSION_LIMIT;". _Py_CheckRecursiveCall() has this comment:
/* Needed for ABI backwards-compatibility (see bpo-31857) */
_Py_CheckRecursionLimit = recursion_limit;
I converted Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros into opaque functions in bpo-38644: commit f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613.
I don't think that the "ABI backwards-compatibility" rationale is correct. These macros never worked in the limited C API: they accessed PyThreadState.recursion_depth and PyThreadState.overflowed members, whereas the PyThreadState structure is opaque in the limited C API (on purpose, see also bpo-39947).
I think that it is now safe to simply remove _Py_CheckRecursionLimit. |
|
Date |
User |
Action |
Args |
2020-05-05 13:59:58 | vstinner | set | recipients:
+ vstinner |
2020-05-05 13:59:58 | vstinner | set | messageid: <1588687198.83.0.363765201865.issue40513@roundup.psfhosted.org> |
2020-05-05 13:59:58 | vstinner | link | issue40513 messages |
2020-05-05 13:59:58 | vstinner | create | |
|