mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least one place so as to avoid regressions.
This commit is contained in:
parent
c377fe2b96
commit
59c900d3bf
3 changed files with 6 additions and 3 deletions
|
@ -100,7 +100,7 @@ PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN;
|
|||
#if defined(Py_DEBUG) || defined(Py_LIMITED_API)
|
||||
#define _PyErr_OCCURRED() PyErr_Occurred()
|
||||
#else
|
||||
#define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type)
|
||||
#define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type)
|
||||
#endif
|
||||
|
||||
/* Error testing and normalization */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue