mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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:
parent
15d4c9fabc
commit
b0edf3b98e
17 changed files with 67 additions and 39 deletions
|
@ -60,7 +60,7 @@ __all__ = [
|
|||
"run_with_tz", "PGO", "missing_compiler_executable",
|
||||
"ALWAYS_EQ", "NEVER_EQ", "LARGEST", "SMALLEST",
|
||||
"LOOPBACK_TIMEOUT", "INTERNET_TIMEOUT", "SHORT_TIMEOUT", "LONG_TIMEOUT",
|
||||
"Py_DEBUG", "EXCEEDS_RECURSION_LIMIT", "C_RECURSION_LIMIT",
|
||||
"Py_DEBUG", "EXCEEDS_RECURSION_LIMIT", "Py_C_RECURSION_LIMIT",
|
||||
"skip_on_s390x",
|
||||
]
|
||||
|
||||
|
@ -2531,7 +2531,7 @@ def adjust_int_max_str_digits(max_digits):
|
|||
EXCEEDS_RECURSION_LIMIT = 5000
|
||||
|
||||
# The default C recursion limit (from Include/cpython/pystate.h).
|
||||
C_RECURSION_LIMIT = 1500
|
||||
Py_C_RECURSION_LIMIT = 1500
|
||||
|
||||
#Windows doesn't have os.uname() but it doesn't support s390x.
|
||||
skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == 's390x',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue