diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-02-01 10:28:51 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-02-01 10:28:51 (GMT) |
commit | 211c6258294bf683935bff73a61ce3dd84070988 (patch) | |
tree | 8dc2a5a5fdcd1f7bc0e176bce006b12e1b588a05 /Objects/setobject.c | |
parent | 776e7014e97a79cc2bd5fffd15908e83ff0273cf (diff) | |
download | cpython-211c6258294bf683935bff73a61ce3dd84070988.zip cpython-211c6258294bf683935bff73a61ce3dd84070988.tar.gz cpython-211c6258294bf683935bff73a61ce3dd84070988.tar.bz2 |
Issue #1717, stage 2: remove uses of tp_compare in Modules and most
Objects.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index d5d96ca..3dc396c 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1824,13 +1824,6 @@ set_richcompare(PySetObject *v, PyObject *w, int op) return Py_NotImplemented; } -static int -set_nocmp(PyObject *self, PyObject *other) -{ - PyErr_SetString(PyExc_TypeError, "cannot compare sets using cmp()"); - return -1; -} - static PyObject * set_add(PySetObject *so, PyObject *key) { @@ -2111,7 +2104,7 @@ PyTypeObject PySet_Type = { 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ - set_nocmp, /* tp_compare */ + 0, /* tp_compare */ (reprfunc)set_repr, /* tp_repr */ &set_as_number, /* tp_as_number */ &set_as_sequence, /* tp_as_sequence */ @@ -2208,7 +2201,7 @@ PyTypeObject PyFrozenSet_Type = { 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ - set_nocmp, /* tp_compare */ + 0, /* tp_compare */ (reprfunc)set_repr, /* tp_repr */ &frozenset_as_number, /* tp_as_number */ &set_as_sequence, /* tp_as_sequence */ |