[issue39858] bitfield layout wrong in ctypes

2020-03-05 Thread Sam Price
Sam Price added the comment: Does not happen on windows. Error is in cfield.c ``` #ifndef MS_WIN32 } else if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfield open */ && dict->size * 8 >= *pfield_size && (*pbitofs + bitsize) <=

[issue39858] bitfield layout wrong in ctypes

2020-03-04 Thread Sam Price
New submission from Sam Price : if 8 1 byte fields are included in a ctype field, it allows an extra byte to be included in the packing when there is no room left for the next field. If I put the bitfields in a child structure then I get expected results. In [35]: run ctypeSizeTest.py Size