diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-12-01 19:50:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 19:50:58 (GMT) |
commit | 0ea395ae964c9cd0f499e2ef0d0030c971201220 (patch) | |
tree | 92e86e1b1754d179c8dc4b397f4fa33e020a3aee /Modules/main.c | |
parent | ebac19dad6263141d5db0a2c923efe049dba99d2 (diff) | |
download | cpython-0ea395ae964c9cd0f499e2ef0d0030c971201220.zip cpython-0ea395ae964c9cd0f499e2ef0d0030c971201220.tar.gz cpython-0ea395ae964c9cd0f499e2ef0d0030c971201220.tar.bz2 |
bpo-32030: Add Python/pathconfig.c (#4668)
* Factorize code from PC/getpathp.c and Modules/getpath.c to remove
duplicated code
* rename pathconfig_clear() to _PyPathConfig_Clear()
* Inline _PyPathConfig_Fini() in pymain_impl() and then remove it,
since it's a oneliner
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/main.c b/Modules/main.c index 4659c5d..6c1cf0d 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -1665,12 +1665,12 @@ pymain_impl(_PyMain *pymain) pymain->status = 120; } - /* _PyPathConfig_Fini() cannot be called in Py_FinalizeEx(). + /* _PyPathConfig_Clear() cannot be called in Py_FinalizeEx(). Py_Initialize() and Py_Finalize() can be called multiple times, but it must not "forget" parameters set by Py_SetProgramName(), Py_SetPath() or - Py_SetPythonHome(), whereas _PyPathConfig_Fini() clear all these + Py_SetPythonHome(), whereas _PyPathConfig_Clear() clear all these parameters. */ - _PyPathConfig_Fini(); + _PyPathConfig_Clear(&_Py_path_config); return 0; } |