aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/coreconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-24 18:23:53 +0200
committerGitHub <noreply@github.com>2019-04-24 18:23:53 +0200
commit43125224d6da5febb34101ebfd36536d791d68cd (patch)
treebbfc1e3bd576c09b48b1b8787998a1eeb472697a /Python/coreconfig.c
parent8e91c246e468515b877690e090c73f496552541d (diff)
downloadcpython-43125224d6da5febb34101ebfd36536d791d68cd.tar.gz
cpython-43125224d6da5febb34101ebfd36536d791d68cd.zip
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.
Diffstat (limited to 'Python/coreconfig.c')
-rw-r--r--Python/coreconfig.c4
1 files changed, 2 insertions, 2 deletions
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;