diff Objects/typeobject.c @ 51246:0162cd4f55be 3.0

Merged revisions 69184 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r69184 | mark.dickinson | 2009-02-01 12:13:56 +0000 (Sun, 01 Feb 2009) | 3 lines 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:31:56 +0000
parents af02b6e42142
children 410dfd423ef1
line wrap: on
line diff
--- a/Objects/typeobject.c	Sun Feb 01 10:41:18 2009 +0000
+++ b/Objects/typeobject.c	Sun Feb 01 12:31: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);
 	}