diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-09-29 23:40:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-29 23:40:17 (GMT) |
commit | fb4ae152a9930f0e00cae8b2807f534058cf341a (patch) | |
tree | 557401018629793ae3de044ca7024384a0e4f3fa /Include/internal | |
parent | 58498bc7178608b1ab031994ca09c43889ce3e76 (diff) | |
download | cpython-fb4ae152a9930f0e00cae8b2807f534058cf341a.zip cpython-fb4ae152a9930f0e00cae8b2807f534058cf341a.tar.gz cpython-fb4ae152a9930f0e00cae8b2807f534058cf341a.tar.bz2 |
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 'Include/internal')
-rw-r--r-- | Include/internal/pycore_initconfig.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_pylifecycle.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Include/internal/pycore_initconfig.h b/Include/internal/pycore_initconfig.h index dcdb616..eb6490f 100644 --- a/Include/internal/pycore_initconfig.h +++ b/Include/internal/pycore_initconfig.h @@ -45,7 +45,7 @@ extern "C" { /* --- PyWideStringList ------------------------------------------------ */ -#define PyWideStringList_INIT (PyWideStringList){.length = 0, .items = NULL} +#define _PyWideStringList_INIT (PyWideStringList){.length = 0, .items = NULL} #ifndef NDEBUG PyAPI_FUNC(int) _PyWideStringList_CheckConsistency(const PyWideStringList *list); diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index cdf5c09..b0a98f5 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -41,7 +41,7 @@ extern PyStatus _PySys_Create( PyThreadState *tstate, PyObject **sysmod_p); extern PyStatus _PySys_SetPreliminaryStderr(PyObject *sysdict); -extern PyStatus _PySys_ReadPreinitWarnOptions(PyConfig *config); +extern PyStatus _PySys_ReadPreinitWarnOptions(PyWideStringList *options); extern PyStatus _PySys_ReadPreinitXOptions(PyConfig *config); extern int _PySys_InitMain( _PyRuntimeState *runtime, |