diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-16 15:38:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-16 15:38:16 (GMT) |
commit | 9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9 (patch) | |
tree | 56b9b45660cc83960c2752e22ee47090632ebb09 /Programs/_freeze_importlib.c | |
parent | ae239f6b0626e926613a4a1dbafa323bd41fec32 (diff) | |
download | cpython-9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9.zip cpython-9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9.tar.gz cpython-9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9.tar.bz2 |
bpo-36763: Add _Py_InitializeMain() (GH-13362)
* Add a private _Py_InitializeMain() function.
* Add again _PyCoreConfig._init_main.
* _Py_InitializeFromConfig() now uses _init_main to decide
if _Py_InitializeMainInterpreter() should be called.
* _PyCoreConfig: rename _frozen to pathconfig_warnings, its value is
now the opposite of Py_FrozenFlag.
* Add an unit test for _init_main=0 and _Py_InitializeMain().
Diffstat (limited to 'Programs/_freeze_importlib.c')
-rw-r--r-- | Programs/_freeze_importlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Programs/_freeze_importlib.c b/Programs/_freeze_importlib.c index 4b2ed70..8cbbe17 100644 --- a/Programs/_freeze_importlib.c +++ b/Programs/_freeze_importlib.c @@ -83,7 +83,8 @@ main(int argc, char *argv[]) config.program_name = L"./_freeze_importlib"; /* Don't install importlib, since it could execute outdated bytecode. */ config._install_importlib = 0; - config._frozen = 1; + config.pathconfig_warnings = 0; + config._init_main = 0; _PyInitError err = _Py_InitializeFromConfig(&config); /* No need to call _PyCoreConfig_Clear() since we didn't allocate any |