[Python-checkins] CVS: python/dist/src/Objects longobject.c,1.70,1.71
Guido van Rossum
gvanrossum@users.sourceforge.net
Wed, 17 Jan 2001 07:33:20 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv12600
Modified Files:
longobject.c
Log Message:
Rich comparisons fall-out:
- Get rid of long_cmp().
- Renamed Py_TPFLAGS_NEWSTYLENUMBER to Py_TPFLAGS_CHECKTYPES.
Index: longobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -r1.70 -r1.71
*** longobject.c 2001/01/04 01:46:03 1.70
--- longobject.c 2001/01/17 15:33:18 1.71
***************
*** 967,983 ****
}
- /* Needed for the new style number compare slots */
- static PyObject *
- long_cmp(PyObject *v, PyObject *w)
- {
- PyLongObject *a, *b;
- int c;
- CONVERT_BINOP(v, w, &a, &b);
- c = long_compare(a, b);
- Py_DECREF(a);
- Py_DECREF(b);
- return PyInt_FromLong(c);
- }
-
static long
long_hash(PyLongObject *v)
--- 967,970 ----
***************
*** 1861,1867 ****
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
-
- /* New style slots */
- (binaryfunc) long_cmp, /*nb_cmp*/
};
--- 1848,1851 ----
***************
*** 1887,1890 ****
0, /*tp_setattro*/
0, /*tp_as_buffer*/
! Py_TPFLAGS_NEWSTYLENUMBER /*tp_flags*/
};
--- 1871,1874 ----
0, /*tp_setattro*/
0, /*tp_as_buffer*/
! Py_TPFLAGS_CHECKTYPES /*tp_flags*/
};