report at bugs
Jul 27, 2012, 5:50 AM
Post #1 of 21
New submission from Amaury Forgeot d'Arc <amauryfa [at] gmail>:
[issue15466] Python/importlib.h is different on 32bit and 64bit
As shown in a patch in issue15431, frozen.c does not output the same data on different platforms.
The first difference looks like this (extracted from the patch):
On first row, 'I' followed by 0xFFFFFFFF on 8 bytes.
On second row, 'l' followed by 3 followed by 0xFFFFFFFF (in 3 chunks of 15 bits).
The Python number 0xFFFFFFFF is marshalled with TYPE_INT64 when SIZEOF_LONG>4 (Unix 64bit), and with TYPE_LONG on other platforms (32bit, or win64)
The C "long" type has much less importance in 3.x Python, because PyIntObject does not exist anymore.
I suggest to remove this distinction, and allow TYPE_INT64 on all platforms.
I don't see any compatibility issue, on unmarshalling both methods produce the same object.
I'll try to suggest a patch later today.
nosy: amaury.forgeotdarc, pitrou
title: Python/importlib.h is different on 32bit and 64bit
Python tracker <report [at] bugs>
Python-bugs-list mailing list