diff options
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r-- | Include/pyerrors.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h index f18e579..94a5290 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -15,6 +15,12 @@ PyAPI_FUNC(void) PyErr_Clear(void); PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **); PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *); +#ifdef Py_DEBUG +#define _PyErr_OCCURRED() PyErr_Occurred() +#else +#define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type) +#endif + /* Error testing and normalization */ PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *); |