-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
MAINT: make Py_SET_SIZE and Py_SET_TYPE macros a bit safer #16501
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
This is the spelling of the compatibility macro that CPython is recommending.
This looks less safe to me, because now it can't be used in an expression like |
I am going to back out of this discussion as I am out of my depth on c/c++ details and let you and Victor sort this out :) |
Let's leave this open to track getting in line with python - we should match what ultimately gets merged in that PR. |
Would it be OK to make it a milestones issue rather? |
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.
From the other PR
@seberg, this is valuable as an open PR because it means it's super easy to edit in-browser :) |
Do you mean that python/cpython#20610 should suggest to use |
The variant I suggested over there using |
Did not expect as fast turn-around... I am half expecting that in the end, there may be some python header we can vendor in here instead. But for now all good as soon as tests pass... I don't mind these small changes there are easy enough, just if there is a mass of tiny macro fixes we backport one-by-one it will get annoying. |
I started a thread on the capi-sig list to propose exactly that: |
This is the spelling of the compatibility macro that CPython is
recommending.
See python/cpython#20610