diff Objects/longobject.c @ 15946:4f621708514b legacy-trunk

Rich comparisons fall-out: - Get rid of long_cmp(). - Renamed Py_TPFLAGS_NEWSTYLENUMBER to Py_TPFLAGS_CHECKTYPES.
author Guido van Rossum <guido@python.org>
date Wed, 17 Jan 2001 15:33:18 +0000
parents 8e402aeca0a3
children dd09f11fa40d
line wrap: on
line diff
--- a/Objects/longobject.c	Wed Jan 17 15:32:23 2001 +0000
+++ b/Objects/longobject.c	Wed Jan 17 15:33:18 2001 +0000
@@ -966,19 +966,6 @@
 	return sign < 0 ? -1 : sign > 0 ? 1 : 0;
 }
 
-/* Needed for the new style number compare slots */
-static PyObject *
-long_cmp(PyObject *v, PyObject *w)
-{
-	PyLongObject *a, *b;
-	int c;
-	CONVERT_BINOP(v, w, &a, &b);
-	c = long_compare(a, b);
-	Py_DECREF(a);
-	Py_DECREF(b);
-	return PyInt_FromLong(c);
-}
-
 static long
 long_hash(PyLongObject *v)
 {
@@ -1860,9 +1847,6 @@
 	0,				/*nb_inplace_and*/
 	0,				/*nb_inplace_xor*/
 	0,				/*nb_inplace_or*/
-
-	/* New style slots */
-	(binaryfunc)	long_cmp,	/*nb_cmp*/
 };
 
 PyTypeObject PyLong_Type = {
@@ -1886,5 +1870,5 @@
 	0,				/*tp_getattro*/
 	0,				/*tp_setattro*/
 	0,				/*tp_as_buffer*/
-	Py_TPFLAGS_NEWSTYLENUMBER 	/*tp_flags*/
+	Py_TPFLAGS_CHECKTYPES		/*tp_flags*/
 };