diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-09-30 01:40:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-30 01:40:17 +0200 |
commit | fb4ae152a9930f0e00cae8b2807f534058cf341a (patch) | |
tree | 557401018629793ae3de044ca7024384a0e4f3fa /Python/sysmodule.c | |
parent | 58498bc7178608b1ab031994ca09c43889ce3e76 (diff) | |
download | cpython-git-fb4ae152a9930f0e00cae8b2807f534058cf341a.tar.gz |
bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)
Fix warnings options priority: PyConfig.warnoptions has the highest
priority, as stated in the PEP 587.
* Document options order in PyConfig.warnoptions documentation.
* Make PyWideStringList_INIT macro private: replace "Py" prefix
with "_Py".
* test_embed: add test_init_warnoptions().
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 9cc7b4b27c..92935408a5 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2037,13 +2037,13 @@ _clear_preinit_entries(_Py_PreInitEntry *optionlist) PyStatus -_PySys_ReadPreinitWarnOptions(PyConfig *config) +_PySys_ReadPreinitWarnOptions(PyWideStringList *options) { PyStatus status; _Py_PreInitEntry entry; for (entry = _preinit_warnoptions; entry != NULL; entry = entry->next) { - status = PyWideStringList_Append(&config->warnoptions, entry->value); + status = PyWideStringList_Append(options, entry->value); if (_PyStatus_EXCEPTION(status)) { return status; } |