[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.

2014-07-16 Thread Olaf Hartmann
Olaf Hartmann added the comment: Answering my own question, here is a workaround, that also produces reasonable results for the original test case. Basically just inserting an empty struct: import ctypes class Empty(ctypes.Structure): _fields_ = [] class Struct(ctypes.Structure

[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.

2014-07-16 Thread Olaf Hartmann
Olaf Hartmann added the comment: I just run into this issue, so i'll bump it with another test case: import ctypes class Struct(ctypes.Structure): _fields_ = [ ("uint8_0", ctypes.c_uint8, 8), ("uint8_1", ctypes.c_uint8, 8), ("