Message117918
Here is at least better, simple patch. But ideally,
mask should be created from variable type. "short" mask
should be created for "short" variable, "long long" mask
for "long long" variable, vise verse.
I'll create such patch next. I hope it's final solution.
////////////////////////////////////////
// This works on attached patch.
from __future__ import print_function
import ctypes
class Blah(ctypes.Structure):
_fields_ = [("a", ctypes.c_uint64, 64),
("b", ctypes.c_uint16, 16),
("c", ctypes.c_uint8, 8),
("d", ctypes.c_uint8, 8)]
x = Blah(0xFEDCBA9876543210,0xBEEF,0x44,0x12)
print(Blah.a, hex(x.a))
print(Blah.b, hex(x.b))
print(Blah.c, hex(x.c))
print(Blah.d, hex(x.d)) |
|
Date |
User |
Action |
Args |
2010-10-03 16:34:31 | ocean-city | set | recipients:
+ ocean-city, theller, ned.deily, stutzbach, r.david.murray, higstar |
2010-10-03 16:34:31 | ocean-city | set | messageid: <1286123671.7.0.877925324078.issue6493@psf.upfronthosting.co.za> |
2010-10-03 16:34:29 | ocean-city | link | issue6493 messages |
2010-10-03 16:34:29 | ocean-city | create | |
|