summaryrefslogtreecommitdiff
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 23d74ee950..9e3b257279 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1611,10 +1611,10 @@ Py_EndInterpreter(PyThreadState *tstate)
PyInterpreterState *interp = tstate->interp;
if (tstate != _PyThreadState_GET()) {
- Py_FatalError("Py_EndInterpreter: thread is not current");
+ Py_FatalError("thread is not current");
}
if (tstate->frame != NULL) {
- Py_FatalError("Py_EndInterpreter: thread still has a frame");
+ Py_FatalError("thread still has a frame");
}
interp->finalizing = 1;
@@ -1624,7 +1624,7 @@ Py_EndInterpreter(PyThreadState *tstate)
call_py_exitfuncs(tstate);
if (tstate != interp->tstate_head || tstate->next != NULL) {
- Py_FatalError("Py_EndInterpreter: not the last thread");
+ Py_FatalError("not the last thread");
}
_PyImport_Cleanup(tstate);
@@ -2241,6 +2241,8 @@ exit:
}
}
+#undef Py_FatalError
+
void _Py_NO_RETURN
Py_FatalError(const char *msg)
{
@@ -2248,6 +2250,12 @@ Py_FatalError(const char *msg)
}
void _Py_NO_RETURN
+_Py_FatalErrorFunc(const char *func, const char *msg)
+{
+ fatal_error(func, msg, -1);
+}
+
+void _Py_NO_RETURN
Py_ExitStatusException(PyStatus status)
{
if (_PyStatus_IS_EXIT(status)) {