-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT #108507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@iritkatriel: Are you ok with this rename? |
cc @markshannon |
Include/cpython/pystate.h
Outdated
@@ -197,12 +197,12 @@ struct _ts { | |||
/* WASI has limited call stack. Python's recursion limit depends on code | |||
layout, optimization, and WASI runtime. Wasmtime can handle about 700 | |||
recursions, sometimes less. 500 is a more conservative limit. */ | |||
#ifndef C_RECURSION_LIMIT | |||
#ifndef Py_C_RECURSION_LIMIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do users define this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's relevant to support that. It's supposed to be a constant built into Python, no?
@iritkatriel: I removed |
It's too late to backport to Python 3.12. |
I don't think that it makes sense to override the Building Python with a different Including In short, IMO it's a good thing to remove |
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 logs Py_C_RECURSION_LIMIT and other _testcapi and _testinternalcapi constants.
db18b1a
to
59e929b
Compare
Since Py_C_RECURSION_LIMIT value is different on WASI, I modified |
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>.