[WIP] bpo-39984: Add PyInterpreterState.ceval by vstinner · Pull Request #19034 · python/cpython
I don't understand the relationship between _Py_CheckRecursionLimit and ceval.recursion_limit.
When USE_STACKCHECK macro is not defined, _Py_CheckRecursiveCall() is called if tstate->recursion_depth is greater than _Py_CheckRecursionLimit.
If USE_STACKCHECK is defined, _Py_CheckRecursiveCall() copies ceval.recursion_limit into _Py_CheckRecursionLimit:
/* Needed for ABI backwards-compatibility (see [bpo-31857](https://bugs.python.org/issue31857)) */
_Py_CheckRecursionLimit = recursion_limit;
See bpo-31857.