Serhiy Storchaka <[email protected]> added the comment:
Would it help if define PACK_SINGLE as below?
#define PACK_SINGLE(ptr, src, type) \
do { \
union { \
type value; \
unsigned char raw[sizeof(type)]; \
} x; \
x.value = (type)src; \
memcpy(ptr, x.raw, sizeof(type)); \
} while (0)
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35752>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com