>> What do you propose for doing proper alignment, then? > > May be "void* dummy[4]" is better for force alignment ? That would have the same alignment as a single pointer. > What about alignment on platforms with pointers > 32 bit ? The C compiler will choose the alignment of the union to be the alignment of the union branch that requires that largest alignment. So if the largest alignment is the one that a pointer has, then alignof(PyGC_HEAD) == alignof(gc_next). The double is in the union only in case it has larger alignment than a pointer. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4