-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-139165: Make Py_SIZE, Py_IS_TYPE,Py_ SET_SIZE regular functions in stable ABI #139166
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
Group them together with Py_TYPE & Py_SET_TYPE to cut down on repetitive preprocessor macros. Format repetitive definitions in object.c more concisely. Py_SET_TYPE is still left out of the Limited API.
Include/object.h
Outdated
| #elif Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 15) | ||
| # if Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 14) |
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 you mean >=?
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.
No, but I can expand the comments :)
- Don't expose the "real" functions for old Limited API - Move implementations below defines so that they pick up the right Py_TYPE definition
vstinner
left a comment
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.
LGTM
…ons in stable ABI (pythonGH-139166) * Make Py_{SIZE,IS_TYPE,SET_SIZE} regular functions in stable ABI Group them together with Py_TYPE & Py_SET_TYPE to cut down on repetitive preprocessor macros. Format repetitive definitions in object.c more concisely. Py_SET_TYPE is still left out of the Limited API.
…ons in stable ABI (pythonGH-139166) * Make Py_{SIZE,IS_TYPE,SET_SIZE} regular functions in stable ABI Group them together with Py_TYPE & Py_SET_TYPE to cut down on repetitive preprocessor macros. Format repetitive definitions in object.c more concisely. Py_SET_TYPE is still left out of the Limited API.
Group them together with Py_TYPE & Py_SET_TYPE to cut down on repetitive preprocessor macros.
Format repetitive definitions in object.c more concisely.
Py_SET_TYPE is still left out of the Limited API.
📚 Documentation preview 📚: https://cpython-previews--139166.org.readthedocs.build/