diff options
Diffstat (limited to 'Python/initconfig.c')
-rw-r--r-- | Python/initconfig.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c index 86285c7..6428676 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -868,9 +868,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2) static PyObject * config_as_dict(const PyConfig *config) { - PyObject *dict; - - dict = PyDict_New(); + PyObject *dict = PyDict_New(); if (dict == NULL) { return NULL; } @@ -2643,6 +2641,16 @@ _Py_GetConfigsAsDict(void) } Py_CLEAR(dict); + /* path config */ + dict = _PyPathConfig_AsDict(); + if (dict == NULL) { + goto error; + } + if (PyDict_SetItemString(result, "path_config", dict) < 0) { + goto error; + } + Py_CLEAR(dict); + return result; error: |