From 43125224d6da5febb34101ebfd36536d791d68cd Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 24 Apr 2019 18:23:53 +0200 Subject: bpo-36710: Add runtime variable to Py_InitializeEx() (GH-12939) Py_InitializeEx() now uses a runtime variable passed to subfunctions, rather than working directly on the global variable _PyRuntime. Add 'runtime' parameter to _PyCoreConfig_Write(), _PySys_Create(), _PySys_InitMain(), _PyGILState_Init(), emit_stderr_warning_for_legacy_locale() and other subfunctions. --- Python/coreconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/coreconfig.c') diff --git a/Python/coreconfig.c b/Python/coreconfig.c index 7b55b06b7a6..d05beef2aa5 100644 --- a/Python/coreconfig.c +++ b/Python/coreconfig.c @@ -1605,13 +1605,13 @@ config_init_stdio(const _PyCoreConfig *config) - set Py_xxx global configuration variables - initialize C standard streams (stdin, stdout, stderr) */ void -_PyCoreConfig_Write(const _PyCoreConfig *config) +_PyCoreConfig_Write(const _PyCoreConfig *config, _PyRuntimeState *runtime) { _PyCoreConfig_SetGlobalConfig(config); config_init_stdio(config); /* Write the new pre-configuration into _PyRuntime */ - _PyPreConfig *preconfig = &_PyRuntime.preconfig; + _PyPreConfig *preconfig = &runtime->preconfig; preconfig->isolated = config->isolated; preconfig->use_environment = config->use_environment; preconfig->dev_mode = config->dev_mode; -- cgit v1.2.3