This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年09月07日 08:15 by Сергей.Ковба, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg169980 - (view) | Author: Сергей Ковба (Сергей.Ковба) | Date: 2012年09月07日 08:15 | |
Such code PackageFile.write(struct.pack( "l", PkgHdrSize)) have different behaviour on 32-bit and 64-bit systems. In case 32-bit system it writes to file 4 bytes. and 8 bytes in case 64-bit system, but in http://docs.python.org/library/struct.html p.7.3.2.2 long type have strict 4-byte size. |
|||
| msg169981 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2012年09月07日 09:02 | |
This is expected behaviour. By default, struct.pack and struct.unpack use the *native* size and alignment. Use "<l" if you want platform-independent behaviour. Relevant docs: http://docs.python.org/library/struct.html#byte-order-size-and-alignment |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 60082 |
| 2012年09月07日 09:02:13 | mark.dickinson | set | status: open -> closed nosy: + mark.dickinson messages: + msg169981 resolution: not a bug |
| 2012年09月07日 08:15:46 | Сергей.Ковба | create | |