diff options
author | Victor Stinner <vstinner@python.org> | 2023-09-08 09:48:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 09:48:28 (GMT) |
commit | b0edf3b98e4b3e68a13776e034b9dd86ad7e529d (patch) | |
tree | 98e1b3a6fe21a9cd32d2143e4a85c74f57b2b007 /Parser | |
parent | 15d4c9fabce67b8a1b5bd9dec9612014ec18291a (diff) | |
download | cpython-b0edf3b98e4b3e68a13776e034b9dd86ad7e529d.zip cpython-b0edf3b98e4b3e68a13776e034b9dd86ad7e529d.tar.gz cpython-b0edf3b98e4b3e68a13776e034b9dd86ad7e529d.tar.bz2 |
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.
Diffstat (limited to 'Parser')
-rwxr-xr-x | Parser/asdl_c.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index ca259c8..f61099b 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1401,8 +1401,8 @@ PyObject* PyAST_mod2obj(mod_ty t) if (!tstate) { return 0; } - state->recursion_limit = C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE; - int recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining; + state->recursion_limit = Py_C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE; + int recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining; starting_recursion_depth = recursion_depth * COMPILER_STACK_FRAME_SCALE; state->recursion_depth = starting_recursion_depth; |