bpo-36301: Cleanup preconfig code (GH-12535)
Prepare code to move some _PyPreConfig parameters into _PyPreCmdline.
Changes:
* _PyCoreConfig_ReadFromArgv(): remove preconfig parameter,
use _PyRuntime.preconfig.
* Add _PyPreCmdline_GetPreConfig() (called by _PyPreConfig_Read()).
* Rename _PyPreCmdline_Init() to _PyPreCmdline_SetArgv()
* Factorize _Py_PreInitializeFromPreConfig() code: add
pyinit_preinit().
* _PyPreConfig_Read() now sets coerce_c_locale to 2 if it must be
coerced.
* Remove _PyCoreConfig_ReadPreConfig().
* _PyCoreConfig_Write() now copies updated preconfig into _PyRuntime.
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 0ccb898..f0b13fd 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -394,7 +394,7 @@
_PyInitError err;
_PyCoreConfig config = _PyCoreConfig_INIT;
- err = _PyCoreConfig_Read(&config, NULL);
+ err = _PyCoreConfig_Read(&config);
if (_Py_INIT_FAILED(err)) {
goto error;
}