MAINT: make Py_SET_SIZE and Py_SET_TYPE macros a bit safer#16501
MAINT: make Py_SET_SIZE and Py_SET_TYPE macros a bit safer#16501eric-wieser merged 2 commits intonumpy:masterfrom
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? |
|
@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