diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-03-25 23:03:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-25 23:03:15 (GMT) |
commit | f78a5e9ce8f32a195f5f788aade79578437f30a6 (patch) | |
tree | 45dfc1faa3647b3f265a56f4e5956cbc5428626f /Modules | |
parent | 548cb6060ab9d5a66931ea2be4da08c2c72c9176 (diff) | |
download | cpython-f78a5e9ce8f32a195f5f788aade79578437f30a6.zip cpython-f78a5e9ce8f32a195f5f788aade79578437f30a6.tar.gz cpython-f78a5e9ce8f32a195f5f788aade79578437f30a6.tar.bz2 |
bpo-36301: Add _Py_GetEnv() function (GH-12542)
* Make _PyPreConfig_GetEnv(), _PyCoreConfig_GetEnv() and
_PyCoreConfig_GetEnvDup() private
* _Py_get_env_flag() first parameter becomes "int use_environment"
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/main.c b/Modules/main.c index 197c9b3..46bc72a 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -655,7 +655,7 @@ pymain_run_file(_PyCoreConfig *config, PyCompilerFlags *cf) static void pymain_run_startup(_PyCoreConfig *config, PyCompilerFlags *cf) { - const char *startup = _PyCoreConfig_GetEnv(config, "PYTHONSTARTUP"); + const char *startup = _Py_GetEnv(config->preconfig.use_environment, "PYTHONSTARTUP"); if (startup == NULL) { return; } @@ -735,7 +735,7 @@ pymain_repl(_PyCoreConfig *config, PyCompilerFlags *cf, int *exitcode) { /* Check this environment variable at the end, to give programs the opportunity to set it from Python. */ - if (!Py_InspectFlag && _PyCoreConfig_GetEnv(config, "PYTHONINSPECT")) { + if (!Py_InspectFlag && _Py_GetEnv(config->preconfig.use_environment, "PYTHONINSPECT")) { Py_InspectFlag = 1; config->inspect = 1; } |