diff Python/ceval.c @ 86140:2aee9c41bb79 3.3

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:38:51 +0200
parents 13d5b245ca14
children 7fa3e824a4ee 19954e5dbef5
line wrap: on
line diff
--- a/Python/ceval.c	Sun Oct 06 21:22:42 2013 +0200
+++ b/Python/ceval.c	Mon Oct 07 20:38:51 2013 +0200
@@ -2083,7 +2083,7 @@
             }
             else {
                 x = PyObject_GetItem(v, w);
-                if (x == NULL && PyErr_Occurred()) {
+                if (x == NULL && _PyErr_OCCURRED()) {
                     if (!PyErr_ExceptionMatches(
                                     PyExc_KeyError))
                         break;
@@ -2127,7 +2127,7 @@
                                        (PyDictObject *)f->f_builtins,
                                        w);
                 if (x == NULL) {
-                    if (!PyErr_Occurred())
+                    if (!_PyErr_OCCURRED())
                         format_exc_check_arg(PyExc_NameError,
                                              GLOBAL_NAME_ERROR_MSG, w);
                     break;