[Python-checkins] r76852 - python/trunk/Objects/typeobject.c
benjamin.peterson
python-checkins at python.org
Wed Dec 16 04:36:23 CET 2009
Author: benjamin.peterson
Date: Wed Dec 16 04:36:22 2009
New Revision: 76852
Log:
remove type_compare, since type_richcompare does the same trick
Modified:
python/trunk/Objects/typeobject.c
Modified: python/trunk/Objects/typeobject.c
==============================================================================
--- python/trunk/Objects/typeobject.c (original)
+++ python/trunk/Objects/typeobject.c Wed Dec 16 04:36:22 2009
@@ -610,15 +610,6 @@
{0}
};
-static int
-type_compare(PyObject *v, PyObject *w)
-{
- /* This is called with type objects only. So we
- can just compare the addresses. */
- Py_uintptr_t vv = (Py_uintptr_t)v;
- Py_uintptr_t ww = (Py_uintptr_t)w;
- return (vv < ww) ? -1 : (vv > ww) ? 1 : 0;
-}
static PyObject*
type_richcompare(PyObject *v, PyObject *w, int op)
@@ -2745,7 +2736,7 @@
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
- type_compare, /* tp_compare */
+ 0, /* tp_compare */
(reprfunc)type_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
More information about the Python-checkins
mailing list