Skip to content

Commit 5087885

Browse files
committed
Change the order in which parts of code objects are serialized
Move co_consts last. For the reason, see: faster-cpython/ideas#66 (comment)
1 parent 1c32286 commit 5087885

File tree

6 files changed

+7186
-7185
lines changed

6 files changed

+7186
-7185
lines changed

Lib/importlib/_bootstrap_external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def _write_atomic(path, data, mode=0o666):
372372
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
373373
# in PC/launcher.c must also be updated.
374374

375-
MAGIC_NUMBER = (9995).to_bytes(2, 'little') + b'\r\n'
375+
MAGIC_NUMBER = (9994).to_bytes(2, 'little') + b'\r\n'
376376
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
377377

378378
_PYCACHE = '__pycache__'

Python/frozen_hello.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const unsigned char _Py_M__hello[] = {
55
0,218,8,60,109,111,100,117,108,101,62,114,0,0,0,0,
66
122,14,60,102,114,111,122,101,110,32,104,101,108,108,111,62,
77
115,16,0,0,0,100,0,90,0,101,1,100,1,131,1,1,
8-
0,100,2,83,0,41,3,84,122,12,72,101,108,108,111,32,
9-
119,111,114,108,100,33,78,41,2,90,11,105,110,105,116,105,
10-
97,108,105,122,101,100,218,5,112,114,105,110,116,169,0,243,
11-
0,0,0,0,243,4,0,0,0,4,0,12,1,114,4,0,
12-
0,0,115,16,0,0,0,15,19,1,12,1,6,7,21,1,
13-
22,1,22,1,22,1,22,114,3,0,0,0,
8+
0,100,2,83,0,41,2,90,11,105,110,105,116,105,97,108,
9+
105,122,101,100,218,5,112,114,105,110,116,169,0,243,0,0,
10+
0,0,243,4,0,0,0,4,0,12,1,114,4,0,0,0,
11+
115,16,0,0,0,15,19,1,12,1,6,7,21,1,22,1,
12+
22,1,22,1,22,114,3,0,0,0,41,3,84,122,12,72,
13+
101,108,108,111,32,119,111,114,108,100,33,78,
1414
};

0 commit comments

Comments
 (0)