gh-126986: Drop _PyInterpreterState_FailIfNotRunning() (gh-126988)

We replace it with _PyErr_SetInterpreterAlreadyRunning().
This commit is contained in:
Eric Snow 2024-11-18 17:11:12 -07:00 committed by GitHub
parent 0063f5f314
commit d6b3e78504
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 15 deletions

View file

@ -983,8 +983,7 @@ _PyXI_ApplyErrorCode(_PyXI_errcode code, PyInterpreterState *interp)
break;
case _PyXI_ERR_ALREADY_RUNNING:
assert(interp != NULL);
assert(_PyInterpreterState_IsRunningMain(interp));
_PyInterpreterState_FailIfRunningMain(interp);
_PyErr_SetInterpreterAlreadyRunning();
break;
case _PyXI_ERR_MAIN_NS_FAILURE:
PyErr_SetString(PyExc_InterpreterError,