This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients pitrou, serhiy.storchaka, vstinner
Date 2012-03-27.06:32:28
SpamBayes Score 3.3537883e-05
Marked as misclassified No
Message-id <201203270932.04515.storchaka@gmail.com>
In-reply-to <CAMpsgwbpZPg4o=2PmwyRmx5k89Fvc4UPtzF-E=nQqPJSJ6adsQ@mail.gmail.com>
Content
> +#if SIZEOF_LONG <= SIZEOF_VOID_P
> +    if (!((size_t) p & LONG_PTR_MASK)) {
> 
> I wrote "q", not "p". You have to check p and q alignement to be able
> to dereference p and q pointers.

Initial q (destination) is always pointer-aligned, because PyASCIIObject is 
pointer-aligned. If PyASCIIObject not aligned, then on this platform alignment 
does not matter. But initial p (source) can be non-aligned. If the initial p 
and q are not equally aligned, then they will not be able to be aligned in the 
future, and the whole loop shall be omitted.

> sizeof(long) <= sizeof(void*) is always true.

Some memory models in I8086 processor had a 4-byte long and a 2-byte pointer. 
It is already in the past, but some modern processors can be 8-byte long and a 
4-byte pointer. I do not know, whether there are such. If you think this 
condition is unnecessary, we can remove it.
History
Date User Action Args
2012-03-27 06:32:29serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner
2012-03-27 06:32:29serhiy.storchakalinkissue14419 messages
2012-03-27 06:32:28serhiy.storchakacreate