summaryrefslogtreecommitdiffstats
path: root/Python/pathconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-12-20 17:00:19 (GMT)
committerGitHub <noreply@github.com>2017-12-20 17:00:19 (GMT)
commitca719ac42b3d58f7c3bcdf63f45b6d62b08b0d01 (patch)
tree6ac9a553b3b9874d4166fc1253681efcc9f00967 /Python/pathconfig.c
parent1f1a34c3145781628e10534440017b3b43211a60 (diff)
downloadcpython-ca719ac42b3d58f7c3bcdf63f45b6d62b08b0d01.zip
cpython-ca719ac42b3d58f7c3bcdf63f45b6d62b08b0d01.tar.gz
cpython-ca719ac42b3d58f7c3bcdf63f45b6d62b08b0d01.tar.bz2
bpo-32030: Add _PyCoreConfig.warnoptions (#4936)
Merge _PyCoreConfig_ReadEnv() into _PyCoreConfig_Read(), and _Py_CommandLineDetails usage is now restricted to pymain_cmdline(). Changes: * _PyCoreConfig: Add nxoption, xoptions, nwarnoption and warnoptions * Add _PyCoreConfig.program: argv[0] or "" * Move filename, command, module and xoptions from _Py_CommandLineDetails to _PyMain. xoptions _Py_OptList becomes (int, wchar_t**) list. * Add pymain_cmdline() function * Rename copy_argv() to copy_wstrlist(). Rename clear_argv() to clear_wstrlist(). Remove _Py_OptList structure: use (int, wchar_t**) list instead. * Rename pymain_set_flag_from_env() to pymain_get_env_flag() * Rename pymain_set_flags_from_env() to pymain_get_env_flags() * _PyMainInterpreterConfig_Read() now creates the warnoptions from _PyCoreConfig.warnoptions * Inline pymain_add_warning_dev_mode() and pymain_add_warning_bytes_flag() into config_init_warnoptions() * Inline pymain_get_program_name() into _PyCoreConfig_Read() * _Py_CommandLineDetails: Replace warning_options with nwarnoption and warnoptions. Replace env_warning_options with nenv_warnoption and env_warnoptions. * pymain_warnings_envvar() now has a single implementation for Windows and Unix: use config_get_env_var_dup() to also get the variable as wchar_t* on Unix.
Diffstat (limited to 'Python/pathconfig.c')
-rw-r--r--Python/pathconfig.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 748084b..acb25b6 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -107,11 +107,6 @@ pathconfig_global_init(void)
_PyInitError err;
_PyCoreConfig config = _PyCoreConfig_INIT;
- err = _PyCoreConfig_ReadEnv(&config);
- if (_Py_INIT_FAILED(err)) {
- goto error;
- }
-
err = _PyCoreConfig_Read(&config);
if (_Py_INIT_FAILED(err)) {
goto error;