Issue #26073: Updates magic number comment in _bootstrap_external.py and changes numbers in launcher.py to decimal to match official table.

This commit is contained in:
Steve Dower 2016-05-16 09:35:18 -07:00
commit 8d0abb9eb6
2 changed files with 18 additions and 15 deletions

View File

@ -229,6 +229,9 @@ _code_type = type(_write_atomic.__code__)
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
# due to the addition of new opcodes).
#
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
MAGIC_NUMBER = (3361).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

View File

@ -1068,21 +1068,21 @@ typedef struct {
} PYC_MAGIC;
static PYC_MAGIC magic_values[] = {
{ 0xc687, 0xc687, L"2.0" },
{ 0xeb2a, 0xeb2a, L"2.1" },
{ 0xed2d, 0xed2d, L"2.2" },
{ 0xf23b, 0xf245, L"2.3" },
{ 0xf259, 0xf26d, L"2.4" },
{ 0xf277, 0xf2b3, L"2.5" },
{ 0xf2c7, 0xf2d1, L"2.6" },
{ 0xf2db, 0xf303, L"2.7" },
{ 0x0bb8, 0x0c3b, L"3.0" },
{ 0x0c45, 0x0c4f, L"3.1" },
{ 0x0c58, 0x0c6c, L"3.2" },
{ 0x0c76, 0x0c9e, L"3.3" },
{ 0x0cb2, 0x0cee, L"3.4" },
{ 0x0cf8, 0x0d16, L"3.5" },
{ 0x0d20, 0x0d20, L"3.6" },
{ 50823, 50823, L"2.0" },
{ 60202, 60202, L"2.1" },
{ 60717, 60717, L"2.2" },
{ 62011, 62021, L"2.3" },
{ 62041, 62061, L"2.4" },
{ 62071, 62131, L"2.5" },
{ 62151, 62161, L"2.6" },
{ 62171, 62211, L"2.7" },
{ 3000, 3131, L"3.0" },
{ 3141, 3151, L"3.1" },
{ 3160, 3180, L"3.2" },
{ 3190, 3230, L"3.3" },
{ 3250, 3310, L"3.4" },
{ 3320, 3350, L"3.5" },
{ 3350, 3350, L"3.6" },
{ 0 }
};