diff options
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c index 7b25a2202c..1463cdca3f 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -158,10 +158,10 @@ PyErr_SetString(PyObject *exception, const char *string) } -PyObject * +PyObject* _Py_HOT_FUNCTION PyErr_Occurred(void) { - PyThreadState *tstate = _PyThreadState_UncheckedGet(); + PyThreadState *tstate = PyThreadState_GET(); return tstate == NULL ? NULL : tstate->curexc_type; } |