Message273005
Michael, byref() is just a helper for passing an object’s address to a C function. Calling func(byref(b), ...) in Python is equivalent to the C code
unpack_bitfields(&b, ...)
I still think the root problem is in unpack_bitfields(). When compiled with XLC, your experiments confirm that it always returns unsigned values, and with GCC, it returns signed values.
It looks like you can detect XLC with the __IBMC__ and __xlC__ macros (not sure if there is a practical difference). So perhaps we can fix this with
#ifndef __xlC__ |
|
Date |
User |
Action |
Args |
2016-08-18 00:43:45 | martin.panter | set | recipients:
+ martin.panter, Michael.Felt, aixtools@gmail.com |
2016-08-18 00:43:44 | martin.panter | set | messageid: <1471481024.97.0.223027195692.issue27643@psf.upfronthosting.co.za> |
2016-08-18 00:43:44 | martin.panter | link | issue27643 messages |
2016-08-18 00:43:44 | martin.panter | create | |
|