Hi,

I have a user who complained about how "struct" module computes C
struct data size on Itanium2 based 64-bit machine.

His first reproducer was
--------------------------------------
#!/usr/local/bin/python
import struct
fmthead = '12id5i5d7id5i3di12i3di'
fmtsize = struct.calcsize(fmthead)
print fmthead,fmtsize
--------------------------------------
And it prints 12id5i5d7id5i3di12i3di 292

And he further provided
   >>struct.calcsize('idi')
   16
   >>struct.calcsize('idid')
   24
   >>struct.calcsize('did')
   20

In response to those, I created corresponding C struct and computed the
data size using "sizeof" operation (gcc was used for compilation), but
they don't seem to match.

Is this a known problem?

Best,
-Dong

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to