• Victor Stinner's avatar
    bpo-36301: Cleanup preconfig code (GH-12535) · f72346c4
    Victor Stinner authored
    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.
    f72346c4
main.c 22.3 KB