Serhiy Storchaka <storchaka+cpyt...@gmail.com> 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 <rep...@bugs.python.org> <https://bugs.python.org/issue35752> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com