• Victor Stinner's avatar
    bpo-36763: Fix Python preinitialization (GH-13432) · 6d1c4674
    Victor Stinner yazdı
    * Add _PyPreConfig.parse_argv
    * Add _PyCoreConfig._config_init field and _PyCoreConfigInitEnum enum
      type
    * Initialization functions: reject preconfig=NULL and config=NULL
    * Add config parameter to _PyCoreConfig_DecodeLocaleErr(): pass
      config->argv to _Py_PreInitializeFromPyArgv(), to parse config
      command line arguments in preinitialization.
    * Add config parameter to _PyCoreConfig_SetString(). It now
      preinitializes Python.
    * _PyCoreConfig_SetPyArgv() now also preinitializes Python for wide
      argv
    * Fix _Py_PreInitializeFromCoreConfig(): don't pass args to
      _Py_PreInitializeFromPyArgv() if config.parse_argv=0.
    * Use "char * const *" and "wchar_t * const *" types for 'argv'
      parameters and _PyArgv.argv.
    * Add unit test on preinitialization from argv.
    * _PyPreConfig.allocator type becomes int
    * Add _PyPreConfig_InitFromPreConfig() and
      _PyPreConfig_InitFromCoreConfig() helper functions
    6d1c4674
coreconfig.c 68.6 KB