summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-10-07 18:40:59 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-10-07 18:40:59 (GMT)
commit1cfa0ba8833c18a330fe9653276de29911198dec (patch)
tree534449bba373b0d1f796be7394da57e7b766f3ee /Python
parent648f860c227187d01f00934e2e9453b32241bdaf (diff)
parent59c900d3bf85965efe7edc1a3bb7e9b49512f6ab (diff)
downloadcpython-1cfa0ba8833c18a330fe9653276de29911198dec.zip
cpython-1cfa0ba8833c18a330fe9653276de29911198dec.tar.gz
cpython-1cfa0ba8833c18a330fe9653276de29911198dec.tar.bz2
Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least one place so as to avoid regressions.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index fcc1c24..dcfe8ec 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2162,7 +2162,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
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 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
(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;