mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-36301: Cleanup preconfig.c and coreconfig.c (GH-12563)
* _PyCoreConfig_Write() now updates _PyRuntime.preconfig * Remove _PyPreCmdline_Copy() * _PyPreCmdline_Read() now accepts _PyPreConfig and _PyCoreConfig optional configurations. * Rename _PyPreConfig_ReadFromArgv() to _PyPreConfig_Read(). Simplify the code. * Calling _PyCoreConfig_Read() no longer adds the warning options twice: don't add a warning option if it's already in the list. * Rename _PyCoreConfig_ReadFromArgv() to _PyCoreConfig_Read(). * Rename config_from_cmdline() to _PyCoreConfig_ReadFromArgv(). * Add more assertions on _PyCoreConfig in _PyCoreConfig_Read(). * Move some functions. * Make some config functions private.
This commit is contained in:
parent
414b1cde93
commit
f8ba6f5afc
9 changed files with 658 additions and 695 deletions
|
@ -466,8 +466,7 @@ static int test_init_from_config(void)
|
|||
config.xoptions.length = Py_ARRAY_LENGTH(xoptions);
|
||||
config.xoptions.items = xoptions;
|
||||
|
||||
static wchar_t* warnoptions[2] = {
|
||||
L"default",
|
||||
static wchar_t* warnoptions[1] = {
|
||||
L"error::ResourceWarning",
|
||||
};
|
||||
config.warnoptions.length = Py_ARRAY_LENGTH(warnoptions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue