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:
parent
e6f060903c
commit
7ae61af827
|
@ -227,6 +227,9 @@ _code_type = type(_write_atomic.__code__)
|
||||||
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
||||||
# longer be understood by older implementations of the eval loop (usually
|
# longer be understood by older implementations of the eval loop (usually
|
||||||
# due to the addition of new opcodes).
|
# 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 = (3350).to_bytes(2, 'little') + b'\r\n'
|
MAGIC_NUMBER = (3350).to_bytes(2, 'little') + b'\r\n'
|
||||||
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
|
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
|
||||||
|
|
|
@ -1068,21 +1068,21 @@ typedef struct {
|
||||||
} PYC_MAGIC;
|
} PYC_MAGIC;
|
||||||
|
|
||||||
static PYC_MAGIC magic_values[] = {
|
static PYC_MAGIC magic_values[] = {
|
||||||
{ 0xc687, 0xc687, L"2.0" },
|
{ 50823, 50823, L"2.0" },
|
||||||
{ 0xeb2a, 0xeb2a, L"2.1" },
|
{ 60202, 60202, L"2.1" },
|
||||||
{ 0xed2d, 0xed2d, L"2.2" },
|
{ 60717, 60717, L"2.2" },
|
||||||
{ 0xf23b, 0xf245, L"2.3" },
|
{ 62011, 62021, L"2.3" },
|
||||||
{ 0xf259, 0xf26d, L"2.4" },
|
{ 62041, 62061, L"2.4" },
|
||||||
{ 0xf277, 0xf2b3, L"2.5" },
|
{ 62071, 62131, L"2.5" },
|
||||||
{ 0xf2c7, 0xf2d1, L"2.6" },
|
{ 62151, 62161, L"2.6" },
|
||||||
{ 0xf2db, 0xf303, L"2.7" },
|
{ 62171, 62211, L"2.7" },
|
||||||
{ 0x0bb8, 0x0c3b, L"3.0" },
|
{ 3000, 3131, L"3.0" },
|
||||||
{ 0x0c45, 0x0c4f, L"3.1" },
|
{ 3141, 3151, L"3.1" },
|
||||||
{ 0x0c58, 0x0c6c, L"3.2" },
|
{ 3160, 3180, L"3.2" },
|
||||||
{ 0x0c76, 0x0c9e, L"3.3" },
|
{ 3190, 3230, L"3.3" },
|
||||||
{ 0x0cb2, 0x0cee, L"3.4" },
|
{ 3250, 3310, L"3.4" },
|
||||||
{ 0x0cf8, 0x0d16, L"3.5" },
|
{ 3320, 3350, L"3.5" },
|
||||||
{ 0x0d20, 0x0d20, L"3.6" },
|
{ 3350, 3350, L"3.6" },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue