mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #1717: remove the cmp builtin function, the C-API functions
PyObject_Cmp, PyObject_Compare, and various support functions.
This commit is contained in:
parent
211c625829
commit
f02e0aaafd
8 changed files with 6 additions and 184 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue