GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT (#108507)
Symbols of the C API should be prefixed by "Py_" to avoid conflict with existing names in 3rd party C extensions on "#include <Python.h>". test.pythoninfo now logs Py_C_RECURSION_LIMIT constant and other _testcapi and _testinternalcapi constants.
This commit is contained in:
@@ -1334,7 +1334,7 @@ init_threadstate(PyThreadState *tstate,
|
||||
|
||||
tstate->py_recursion_limit = interp->ceval.recursion_limit,
|
||||
tstate->py_recursion_remaining = interp->ceval.recursion_limit,
|
||||
tstate->c_recursion_remaining = C_RECURSION_LIMIT;
|
||||
tstate->c_recursion_remaining = Py_C_RECURSION_LIMIT;
|
||||
|
||||
tstate->exc_info = &tstate->exc_state;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user