diff options
author | Neil Schemenauer <nas-github@arctrix.com> | 2021-03-06 13:34:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-06 13:34:03 -0800 |
commit | 87ec26b812e9c4095c017dc60f246eda37b83ab2 (patch) | |
tree | 5f690c46fb72f2d2e368c086f7310a46ea6368f1 /Python/frozen.c | |
parent | 5eb7796b7f3aae91b145ccea51b528662f3b5ce1 (diff) | |
download | cpython-git-87ec26b812e9c4095c017dc60f246eda37b83ab2.tar.gz |
bpo-43372: Use _freeze_importlib for regen-frozen. (GH-24759)
This approach ensures the code matches the interpreter version.
Previously, PYTHON_FOR_REGEN was used to generate the code, which might
be wrong. The marshal format for code objects has changed with
bpo-42246, commit 877df851. Update the code and the expected code sizes
in ctypes test_frozentable.
Diffstat (limited to 'Python/frozen.c')
-rw-r--r-- | Python/frozen.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Python/frozen.c b/Python/frozen.c index d4104e1664..7f433ff80c 100644 --- a/Python/frozen.c +++ b/Python/frozen.c @@ -11,12 +11,11 @@ some famous words... */ /* Run "make regen-frozen" to regen the file below (e.g. after a bytecode - * format change). The file is created by Tools/frozen/regen_frozen.py. The - * include file defines M___hello__ as an array of bytes. + * format change). The include file defines _Py_M__hello as an array of bytes. */ #include "frozen_hello.h" -#define SIZE (int)sizeof(M___hello__) +#define SIZE (int)sizeof(_Py_M__hello) static const struct _frozen _PyImport_FrozenModules[] = { /* importlib */ @@ -27,10 +26,10 @@ static const struct _frozen _PyImport_FrozenModules[] = { {"zipimport", _Py_M__zipimport, (int)sizeof(_Py_M__zipimport)}, /* Test module */ - {"__hello__", M___hello__, SIZE}, + {"__hello__", _Py_M__hello, SIZE}, /* Test package (negative size indicates package-ness) */ - {"__phello__", M___hello__, -SIZE}, - {"__phello__.spam", M___hello__, SIZE}, + {"__phello__", _Py_M__hello, -SIZE}, + {"__phello__.spam", _Py_M__hello, SIZE}, {0, 0, 0} /* sentinel */ }; |