Re: A bug in struct module on the 64-bit platform?

2005-12-01 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > This is the case on my linux/x86_64 machine: > $ python -c 'import struct; print struct.calcsize("idi")' > 20 > I don't know much about 'itanium', but i'd be surprised if they > chose 4-byte alignment for doubles. oops. missed your reply. > http://h21007.www2.

Re: A bug in struct module on the 64-bit platform?

2005-12-01 Thread Fredrik Lundh
Neal Norwitz wrote: >> I have a user who complained about how "struct" module computes C >> struct data size on Itanium2 based 64-bit machine. > > I wouldn't be surprised, but I don't understand the problem. > >>>>struct.calcsize('idi') >>16 >>>>struct.calcsize('idid') >>24 >>>

Re: A bug in struct module on the 64-bit platform?

2005-12-01 Thread jepler
I'm guessing that the expected behavior is >>> struct.calcsize('idi') 20 because the double should be aligned to an 8-byte boundary. This is the case on my linux/x86_64 machine: $ python -c 'import struct; print struct.calcsize("idi")' 20 I don't know much about 'itanium', but i'd b

Re: A bug in struct module on the 64-bit platform?

2005-11-30 Thread Neal Norwitz
[EMAIL PROTECTED] wrote: > Hi, > > I have a user who complained about how "struct" module computes C > struct data size on Itanium2 based 64-bit machine. I wouldn't be surprised, but I don't understand the problem. >>>struct.calcsize('idi') >16 >>>struct.calcsize('idid') >24 >

A bug in struct module on the 64-bit platform?

2005-11-30 Thread [EMAIL PROTECTED]
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) prin