diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-12-16 03:36:22 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-12-16 03:36:22 +0000 |
commit | 0c0dcaf2724069804545a738f4a6431f05a6c23d (patch) | |
tree | 8288ae13b35d98d5999943b334afdc7f4766d78c | |
parent | 36902988a6068b97671d4ebcac1c6ce579429bca (diff) | |
download | cpython-git-0c0dcaf2724069804545a738f4a6431f05a6c23d.tar.gz |
remove type_compare, since type_richcompare does the same trick
-rw-r--r-- | Objects/typeobject.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 8ef23d52e1..28df7f29d1 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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 */ |