Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Sep 19, 2025

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/

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
Comment on lines 325 to 326
#elif Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 15)
# if Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 14)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean >=?

Copy link
Member Author

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
@encukou encukou marked this pull request as ready for review November 20, 2025 12:54
@encukou encukou requested review from a team and ZeroIntensity as code owners November 20, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants