bpo-38631: _PyGILState_Init() returns PyStatus (GH-18908)

_PyGILState_Init() now returns PyStatus rather than calling
Py_FatalError() on failure.
This commit is contained in:
Victor Stinner 2020-03-10 23:49:16 +01:00 committed by GitHub
parent 88f82b2b9e
commit 4e53abb0f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -551,7 +551,10 @@ pycore_create_interpreter(_PyRuntimeState *runtime,
_PyEval_FiniThreads(&runtime->ceval);
/* Auto-thread-state API */
_PyGILState_Init(tstate);
status = _PyGILState_Init(tstate);
if (_PyStatus_EXCEPTION(status)) {
return status;
}
/* Create the GIL */
status = _PyEval_InitThreads(tstate);