diff Objects/typeobject.c @ 51245:9ca34c18e1bd

Issue #1717: remove the cmp builtin function, the C-API functions PyObject_Cmp, PyObject_Compare, and various support functions.
author Mark Dickinson <dickinsm@gmail.com>
date Sun, 01 Feb 2009 12:13:56 +0000
parents e14ec6d18ab8
children ba94d7c095e8
line wrap: on
line diff
--- a/Objects/typeobject.c	Sun Feb 01 10:28:51 2009 +0000
+++ b/Objects/typeobject.c	Sun Feb 01 12:13:56 2009 +0000
@@ -2897,7 +2897,7 @@
 	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);
 	}