mirror of
https://github.com/python/cpython.git
synced 2025-10-20 08:23:47 +00:00
PyObject_Compare can raise an exception now.
This commit is contained in:
parent
5b2121b25f
commit
c8b6df9004
7 changed files with 67 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue