PyObject_Compare can raise an exception now.

This commit is contained in:
Guido van Rossum 1997-05-23 00:06:51 +00:00
parent 5b2121b25f
commit c8b6df9004
7 changed files with 67 additions and 31 deletions

View file

@ -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;
}