mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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
This commit is contained in:
parent
ebac19dad6
commit
0ea395ae96
10 changed files with 204 additions and 291 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue