Issue #1717: remove the cmp builtin function, the C-API functions

PyObject_Cmp, PyObject_Compare, and various support functions.
This commit is contained in:
Mark Dickinson 2009-02-01 12:13:56 +00:00
parent 211c625829
commit f02e0aaafd
8 changed files with 6 additions and 184 deletions

View file

@ -2897,7 +2897,7 @@ same_slots_added(PyTypeObject *a, PyTypeObject *b)
slots_a = ((PyHeapTypeObject *)a)->ht_slots;
slots_b = ((PyHeapTypeObject *)b)->ht_slots;
if (slots_a && slots_b) {
if (PyObject_Compare(slots_a, slots_b) != 0)
if (PyObject_RichCompareBool(slots_a, slots_b, Py_EQ) != 1)
return 0;
size += sizeof(PyObject *) * PyTuple_GET_SIZE(slots_a);
}