bpo-43693: Turn localspluskinds into an object (GH-26749)

Managing it as a bare pointer to malloc'ed bytes is just too awkward in a few places.
This commit is contained in:
Guido van Rossum 2021-06-21 13:53:04 -07:00 committed by GitHub
parent c5d700f0e2
commit 355f5dd36a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 5455 additions and 5395 deletions

View file

@ -359,6 +359,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.11a1 3454 (compute cell offsets relative to locals bpo-43693)
# Python 3.11a1 3455 (add MAKE_CELL bpo-43693)
# Python 3.11a1 3456 (interleave cell args bpo-43693)
# Python 3.11a1 3457 (Change localsplus to a bytes object bpo-43693)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
@ -368,7 +369,7 @@ _code_type = type(_write_atomic.__code__)
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
MAGIC_NUMBER = (3456).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3457).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'