Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 5610:10e9cfa010f0 legacy-trunk
PyObject_Compare can raise an exception now.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 23 May 1997 00:06:51 +0000 |
| parents | 19d4a2874645 |
| children | 9ed26afeeaa5 |
line wrap: on
line diff
--- a/Python/compile.c Fri May 23 00:01:41 1997 +0000 +++ b/Python/compile.c Fri May 23 00:06:51 1997 +0000 @@ -666,7 +666,8 @@ 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; }
