Skip to content

Commit fbc2d3a

Browse files
committed
Python/ceval_gil.c
1 parent b4f1971 commit fbc2d3a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Python/ceval_gil.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "Python.h"
33
#include "pycore_atomic.h" // _Py_atomic_int
44
#include "pycore_ceval.h" // _PyEval_SignalReceived()
5-
#include "pycore_pyerrors.h" // _PyErr_Fetch()
5+
#include "pycore_pyerrors.h" // _PyErr_GetRaisedException()
66
#include "pycore_pylifecycle.h" // _PyErr_Print()
77
#include "pycore_initconfig.h" // _PyStatus_OK()
88
#include "pycore_interp.h" // _Py_RunGC()
@@ -870,10 +870,9 @@ _Py_FinishPendingCalls(PyThreadState *tstate)
870870
}
871871

872872
if (make_pending_calls(tstate->interp) < 0) {
873-
PyObject *exc, *val, *tb;
874-
_PyErr_Fetch(tstate, &exc, &val, &tb);
873+
PyObject *exc = _PyErr_GetRaisedException(tstate);
875874
PyErr_BadInternalCall();
876-
_PyErr_ChainExceptions(exc, val, tb);
875+
_PyErr_ChainExceptions1(exc);
877876
_PyErr_Print(tstate);
878877
}
879878
}

0 commit comments

Comments
 (0)