summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-10-01 12:06:16 +0200
committerGitHub <noreply@github.com>2019-10-01 12:06:16 +0200
commit8462a4936b3a551dc546a6adea04a70b0a07ca67 (patch)
tree3c4655f174d1aa9abcdb5226532db0e4d7434bca /Python/pystate.c
parent3c30a76f3d3c0dcc1fb4de097fa4a3a4c92c0b0b (diff)
downloadcpython-git-8462a4936b3a551dc546a6adea04a70b0a07ca67.tar.gz
bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)
PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 69b86ce4f7..f3d89e7d2b 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -205,14 +205,7 @@ PyInterpreterState_New(void)
memset(interp, 0, sizeof(*interp));
interp->id_refcount = -1;
- PyStatus status = PyConfig_InitPythonConfig(&interp->config);
- if (_PyStatus_EXCEPTION(status)) {
- /* Don't report status to caller: PyConfig_InitPythonConfig()
- can only fail with a memory allocation error. */
- PyConfig_Clear(&interp->config);
- PyMem_RawFree(interp);
- return NULL;
- }
+ PyConfig_InitPythonConfig(&interp->config);
interp->eval_frame = _PyEval_EvalFrameDefault;
#ifdef HAVE_DLOPEN