Skip to content

gh-89639: Revert Py_SIZE() static inline function #96119

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

Closed
wants to merge 1 commit into from
Closed

gh-89639: Revert Py_SIZE() static inline function #96119

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 19, 2022

Allow again to use Py_SIZE() to set an object size:
"Py_SIZE(obj) = size".

Partially revert commit cb15afc.

Allow again to use Py_SIZE() to set an object size:
"Py_SIZE(obj) = size".

Partially revert commit cb15afc.
@vstinner
Copy link
Member Author

@vstinner
Copy link
Member Author

Py_TYPE() and Py_SIZE() changed multiple times since 2020: https://peps.python.org/pep-0674/#py-type-and-py-size-macros

@vstinner vstinner marked this pull request as draft August 29, 2022 10:00
@vstinner
Copy link
Member Author

I prefer to mark the PR as a draft to not merge it by mistake. I would prefer to reach a consensus and get a Steering Council decision.

@vstinner
Copy link
Member Author

the Steering Council have decided not to revert these changes in 3.11 to not affect the stability of the release as at the time this was discussed, the 3.11 branch was already in release candidate 1.

ref: https://discuss.python.org/t/pep-674-disallow-using-macros-as-l-values-and-python-3-11/18297/14

I close my PR.

@vstinner vstinner closed this Sep 28, 2022
@vstinner vstinner deleted the py_size branch September 28, 2022 23:14
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.

3 participants