mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
88f82b2b9e
commit
4e53abb0f4
3 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue