The struct module uses pre-C11 hacks to determine alignment for types:
cpython/Modules/_struct.c
Lines 79 to 106 in 5808889
Now we can use _Alignof operator, as C11-compatible compiler is a build requireent.
This is a minor feature, which does not need previous discussion elsewhere
No response
Considering I did use _Alignof in my recent PR (#132428), I support this proposal.
pythongh-132868: use _Alignof() operator in the struct module
PR is ready: #132872
gh-132868: use `_Alignof()` C11 operator in the `struct` module (#132872
Activity
picnixz commented on Apr 24, 2025
Considering I did use _Alignof in my recent PR (#132428), I support this proposal.
pythongh-132868: use _Alignof() operator in the struct module
skirpichev commented on Apr 24, 2025
PR is ready: #132872
gh-132868: use `_Alignof()` C11 operator in the `struct` module (#132872