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 skrah
Recipients ammar2, benjamin.peterson, cstratak, gregory.p.smith, mark.dickinson, meador.inge, petr.viktorin, skrah, vstinner
Date 2020-03-12.16:32:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584030739.35.0.262165546043.issue39689@roundup.psfhosted.org>
In-reply-to
Content
The memcpy() is NOT a hack and performs exactly the same operation
as casting the pointer and then dereferencing, only in a manner that
avoids unaligned accesses.

On platforms like x86 the memcpy() is optimized to a simple assignment.

Casting the pointer and then dereferencing would also be subject
to the UB warnings.


You are the one who wanted to *introduce* a hack by dereferencing
as char and then cast to _Bool. :-)
History
Date User Action Args
2020-03-12 16:32:19skrahsetrecipients: + skrah, gregory.p.smith, mark.dickinson, vstinner, benjamin.peterson, petr.viktorin, meador.inge, cstratak, ammar2
2020-03-12 16:32:19skrahsetmessageid: <1584030739.35.0.262165546043.issue39689@roundup.psfhosted.org>
2020-03-12 16:32:19skrahlinkissue39689 messages
2020-03-12 16:32:19skrahcreate