aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-08 11:48:28 +0200
committerGitHub <noreply@github.com>2023-09-08 09:48:28 +0000
commitb0edf3b98e4b3e68a13776e034b9dd86ad7e529d (patch)
tree98e1b3a6fe21a9cd32d2143e4a85c74f57b2b007 /Modules/_testcapimodule.c
parent15d4c9fabce67b8a1b5bd9dec9612014ec18291a (diff)
downloadcpython-b0edf3b98e4b3e68a13776e034b9dd86ad7e529d.tar.gz
cpython-b0edf3b98e4b3e68a13776e034b9dd86ad7e529d.zip
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 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 9bd963baf06..85d8401435e 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -3922,6 +3922,7 @@ PyInit__testcapi(void)
PyModule_AddObject(m, "instancemethod", (PyObject *)&PyInstanceMethod_Type);
PyModule_AddIntConstant(m, "the_number_three", 3);
+ PyModule_AddIntMacro(m, Py_C_RECURSION_LIMIT);
TestError = PyErr_NewException("_testcapi.error", NULL, NULL);
Py_INCREF(TestError);