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 ztane
Recipients benjamin.peterson, christian.heimes, doko, ztane
Date 2016-09-11.10:00:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There is no need to ifdef anything, the memcpy is the only correct way to do it. As memcpy is also a reserved identifier in C, the compiler can and will optimize this into a 64-bit access on those platforms where it can be safely done so (x86 for example), e.g. GCC compiles

    uint64_t func(char *buf) {
        uint64_t rv;
        memcpy(&rv, buf+3, sizeof(rv));
        return rv;


    movq    3(%rdi), %rax

On Linux 64-bit ABI.
Date User Action Args
2016-09-11 10:00:33ztanesetrecipients: + ztane, doko, christian.heimes, benjamin.peterson
2016-09-11 10:00:33ztanesetmessageid: <>
2016-09-11 10:00:33ztanelinkissue28055 messages
2016-09-11 10:00:33ztanecreate