mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)
PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore.
This commit is contained in:
parent
3c30a76f3d
commit
8462a4936b
12 changed files with 56 additions and 216 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue