diff 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
line wrap: on
line diff
--- a/Include/pyerrors.h	Sun Oct 06 17:19:54 2013 -0700
+++ b/Include/pyerrors.h	Mon Oct 07 20:40:59 2013 +0200
@@ -101,7 +101,7 @@
 #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 */