diff Python/ceval.c @ 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 e7f6cef7a4cc 2aee9c41bb79
children 3ce0102e4c1f
line wrap: on
line diff
--- a/Python/ceval.c	Sun Oct 06 17:19:54 2013 -0700
+++ b/Python/ceval.c	Mon Oct 07 20:40:59 2013 +0200
@@ -2162,7 +2162,7 @@
             }
             else {
                 v = PyObject_GetItem(locals, name);
-                if (v == NULL && PyErr_Occurred()) {
+                if (v == NULL && _PyErr_OCCURRED()) {
                     if (!PyErr_ExceptionMatches(PyExc_KeyError))
                         goto error;
                     PyErr_Clear();
@@ -2207,7 +2207,7 @@
                                        (PyDictObject *)f->f_builtins,
                                        name);
                 if (v == NULL) {
-                    if (!PyErr_Occurred())
+                    if (!_PyErr_OCCURRED())
                         format_exc_check_arg(PyExc_NameError,
                                              NAME_ERROR_MSG, name);
                     goto error;