mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +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
|
|
@ -1552,6 +1552,11 @@ module_exec(PyObject *module)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (PyModule_Add(module, "SIZEOF_PYOBJECT",
|
||||
PyLong_FromSsize_t(sizeof(PyObject))) < 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (PyModule_Add(module, "SIZEOF_TIME_T",
|
||||
PyLong_FromSsize_t(sizeof(time_t))) < 0) {
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue