From f29084d611a6ca504c99a0967371374febf0ccc3 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 20 Mar 2019 02:20:13 +0100 Subject: bpo-36301: Add _PyRuntime.pre_initialized (GH-12457) * Add _PyRuntime.pre_initialized: set to 1 when Python is pre-initialized * Add _Py_PreInitialize() and _Py_PreInitializeFromPreConfig(). * _PyCoreConfig_Read() now calls _Py_PreInitialize(). * Move _PyPreConfig_GetGlobalConfig() and _PyCoreConfig_GetGlobalConfig() calls from main.c to preconfig.c and coreconfig.c. --- Python/preconfig.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/preconfig.c') diff --git a/Python/preconfig.c b/Python/preconfig.c index b03436181c..a149ea54f6 100644 --- a/Python/preconfig.c +++ b/Python/preconfig.c @@ -672,6 +672,8 @@ _PyPreConfig_ReadFromArgv(_PyPreConfig *config, const _PyArgv *args) goto done; } + _PyPreConfig_GetGlobalConfig(config); + if (_PyPreConfig_Copy(&save_config, config) < 0) { err = _Py_INIT_NO_MEMORY(); goto done; -- cgit v1.2.1