Mercurial > cpython-lru_cache-weakref
comparison Include/pyerrors.h @ 86141:19954e5dbef5
Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least one place so as to avoid regressions.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Mon, 07 Oct 2013 20:40:59 +0200 |
| parents | bfaf3a2907bd 2aee9c41bb79 |
| children | 854a2cea31b9 |
comparison
equal
deleted
inserted
replaced
| 86139:516576f5f9dc | 86141:19954e5dbef5 |
|---|---|
| 99 PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN; | 99 PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN; |
| 100 | 100 |
| 101 #if defined(Py_DEBUG) || defined(Py_LIMITED_API) | 101 #if defined(Py_DEBUG) || defined(Py_LIMITED_API) |
| 102 #define _PyErr_OCCURRED() PyErr_Occurred() | 102 #define _PyErr_OCCURRED() PyErr_Occurred() |
| 103 #else | 103 #else |
| 104 #define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type) | 104 #define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type) |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 /* Error testing and normalization */ | 107 /* Error testing and normalization */ |
| 108 PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); | 108 PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); |
| 109 PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *); | 109 PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *); |
