> > Example: 16-bit m68k
> no, it's a 32bit platform with extra alignment requirements.

Actually, fewer. Most architectures have alignof(x) == sizeof(x) for all the 
primitive types, but m68k is more relaxed and caps alignof(x) at 2. This means 
that assert((p & sizeof(long)) == 0) is too strict, and should instead just be 
assert((p & alignof(long)) == 0), which is always correct, rather than relying 
on implementation-defined alignment requirements. In autoconf there's 
AC_CHECK_ALIGNOF just as there is AC_CHECK_SIZEOF, the result of which should 
be used for the alignment check instead. That's the portable way to do it (and 
would allow the removal of the #ifdef).
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VZU4F6OQZ2ADHHH7ZWL7DGEIRRBBFQYR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to