Message117663
An endian issue? (i.e. on OS X, it works on ppc but not Intel)
A slightly more detailed test case:
$ more test_ctypes.py
import ctypes
class Blah2(ctypes.Structure):
_fields_ = [("x", ctypes.c_uint64, 64),
("y", ctypes.c_uint64)]
val = 0x0123456789ABCDEF
x = Blah2(val, val)
print(Blah2.x)
print(hex(x.x))
print(Blah2.y)
print(hex(x.y))
$ arch -i386 python2.7 test_ctypes.py
<Field type=c_ulonglong, ofs=0:0, bits=64>
0x0L
<Field type=c_ulonglong, ofs=8, size=8>
0x123456789abcdefL
$ arch -x86_64 python2.7 test_ctypes.py
<Field type=c_ulong, ofs=0:0, bits=64>
0x0L
<Field type=c_ulong, ofs=8, size=8>
0x123456789abcdefL
$ arch -ppc python2.7 test_ctypes.py
<Field type=c_ulonglong, ofs=0:0, bits=64>
0x123456789abcdefL
<Field type=c_ulonglong, ofs=8, size=8>
0x123456789abcdefL |
|
Date |
User |
Action |
Args |
2010-09-29 22:00:15 | ned.deily | set | recipients:
+ ned.deily, theller, stutzbach |
2010-09-29 22:00:15 | ned.deily | set | messageid: <1285797615.37.0.569535220092.issue9989@psf.upfronthosting.co.za> |
2010-09-29 22:00:13 | ned.deily | link | issue9989 messages |
2010-09-29 22:00:13 | ned.deily | create | |
|