Stefan Krah <ste...@bytereef.org> added the comment:

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. :-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39689>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to