[Python-checkins] CVS: python/dist/src/Objects intobject.c,2.54,2.55
Guido van Rossum
gvanrossum@users.sourceforge.net
Wed, 17 Jan 2001 07:32:25 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv12509
Modified Files:
intobject.c
Log Message:
Rich comparisons fall-out:
- Get rid of int_cmp().
- Renamed Py_TPFLAGS_NEWSTYLENUMBER to Py_TPFLAGS_CHECKTYPES.
Index: intobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v
retrieving revision 2.54
retrieving revision 2.55
diff -C2 -r2.54 -r2.55
*** intobject.c 2001/01/04 01:45:33 2.54
--- intobject.c 2001/01/17 15:32:23 2.55
***************
*** 258,271 ****
}
- /* 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)
--- 258,261 ----
***************
*** 796,802 ****
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
-
- /* New style slots: */
- (binaryfunc)int_cmp, /*nb_cmp*/
};
--- 786,789 ----
***************
*** 822,826 ****
0, /*tp_setattro*/
0, /*tp_as_buffer*/
! Py_TPFLAGS_NEWSTYLENUMBER /*tp_flags*/
};
--- 809,813 ----
0, /*tp_setattro*/
0, /*tp_as_buffer*/
! Py_TPFLAGS_CHECKTYPES /*tp_flags*/
};