summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-23 00:06:51 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-23 00:06:51 (GMT)
commitc8b6df90045a3f419e6fab272d93ad4159e54ccc (patch)
tree20cb4b6f0ba2718577079198780d5fc3852e4a70 /Python/compile.c
parent5b2121b25fc6a50fe229fe25ef6be8a2f883d1f4 (diff)
downloadcpython-c8b6df90045a3f419e6fab272d93ad4159e54ccc.zip
cpython-c8b6df90045a3f419e6fab272d93ad4159e54ccc.tar.gz
cpython-c8b6df90045a3f419e6fab272d93ad4159e54ccc.tar.bz2
PyObject_Compare can raise an exception now.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 155142a..36304e3 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -666,7 +666,8 @@ com_add(c, list, v)
if (v->ob_type == w->ob_type && PyObject_Compare(v, w) == 0)
return i;
}
- if (PyList_Append(list, v) != 0)
+ /* Check for error from PyObject_Compare */
+ if (PyErr_Occurred() || PyList_Append(list, v) != 0)
c->c_errors++;
return n;
}