diff options
author | Guido van Rossum <guido@python.org> | 2001-01-17 15:32:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-01-17 15:32:23 (GMT) |
commit | 3968e4c0f5fc95242c85d7164f6fcea881b320f9 (patch) | |
tree | 1458d21263c054d429fb5d1a3dc01c61a8160e56 /Objects | |
parent | c31896960a24202bd972e8c79d288cd3a80fac94 (diff) | |
download | cpython-3968e4c0f5fc95242c85d7164f6fcea881b320f9.zip cpython-3968e4c0f5fc95242c85d7164f6fcea881b320f9.tar.gz cpython-3968e4c0f5fc95242c85d7164f6fcea881b320f9.tar.bz2 |
Rich comparisons fall-out:
- Get rid of int_cmp().
- Renamed Py_TPFLAGS_NEWSTYLENUMBER to Py_TPFLAGS_CHECKTYPES.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/intobject.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index c51eda0..72d5323 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -257,16 +257,6 @@ int_compare(PyIntObject *v, PyIntObject *w) return (i < j) ? -1 : (i > j) ? 1 : 0; } -/* Needed for the new style number compare slots */ -static PyObject * -int_cmp(PyObject *v, PyObject *w) -{ - register long a, b; - CONVERT_TO_LONG(v, a); - CONVERT_TO_LONG(w, b); - return PyInt_FromLong((a < b) ? -1 : (a > b) ? 1 : 0); -} - static long int_hash(PyIntObject *v) { @@ -795,9 +785,6 @@ static PyNumberMethods int_as_number = { 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ - - /* New style slots: */ - (binaryfunc)int_cmp, /*nb_cmp*/ }; PyTypeObject PyInt_Type = { @@ -821,7 +808,7 @@ PyTypeObject PyInt_Type = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_NEWSTYLENUMBER /*tp_flags*/ + Py_TPFLAGS_CHECKTYPES /*tp_flags*/ }; void |