]> granicus.if.org Git - python/commitdiff
remove type_compare, since type_richcompare does the same trick
authorBenjamin Peterson <benjamin@python.org>
Wed, 16 Dec 2009 03:36:22 +0000 (03:36 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 16 Dec 2009 03:36:22 +0000 (03:36 +0000)
Objects/typeobject.c

index 8ef23d52e19f547fcf772ab972ea8cd5adc8e0d9..28df7f29d156164985ad1b0a679e92357b74fbe8 100644 (file)
@@ -610,15 +610,6 @@ static PyGetSetDef type_getsets[] = {
        {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 @@ PyTypeObject PyType_Type = {
        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 */