Message363417
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 is 4 Expected 3
0 0x10000 a0
0 0x10001 a1
0 0x10002 a2
0 0x10003 a3
0 0x10004 a4
0 0x10005 a5
0 0x10006 a6
0 0x10007 a7
0 0x40008 b0 <- Expected to be at offset 1, not 0.
2 0xc0000 b1 <- Expected to be at offset 1, not 2
Size is 3 Expected 3
0 0x1 a
1 0x40000 b0
1 0xc0004 b1 |
|
Date |
User |
Action |
Args |
2020-03-05 05:22:36 | thesamprice | set | recipients:
+ thesamprice |
2020-03-05 05:22:36 | thesamprice | set | messageid: <1583385756.4.0.955468761993.issue39858@roundup.psfhosted.org> |
2020-03-05 05:22:35 | thesamprice | link | issue39858 messages |
2020-03-05 05:22:35 | thesamprice | create | |
|