>> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com