if (ConfigDict['embed'].find(':END') != -1):\r
Remainder = Offset % (MaxAlign/8) # MaxAlign is either 32 or 64\r
if Remainder:\r
- Diff = (MaxAlign/8) - Remainder\r
+ Diff = int((MaxAlign/8) - Remainder)\r
Offset = Offset + Diff\r
ItemOffset = ItemOffset + Diff\r
MaxAlign = 32 # Reset to default 32 align when struct end\r
Remainder = Offset % max(ItemLength/8, 4, SizeAlign)\r
Offset = Offset + ItemLength\r
if Remainder:\r
- Diff = max(ItemLength/8, 4, SizeAlign) - Remainder\r
+ Diff = int(max(ItemLength/8, 4, SizeAlign) - Remainder)\r
ItemOffset = ItemOffset + Diff\r
ConfigDict['offset'] = ItemOffset\r
\r
if BitsRemain:\r
BsfFd.write(" Skip %d bits\n" % BitsRemain)\r
BitsGap -= BitsRemain\r
- BytesRemain = BitsGap / 8\r
+ BytesRemain = int(BitsGap / 8)\r
if BytesRemain:\r
BsfFd.write(" Skip %d bytes\n" % BytesRemain)\r
NextOffset = Item['offset'] + Item['length']\r