[Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.108,2.109
Tim Peters
tim_one@users.sourceforge.net
Tue, 11 Dec 2001 11:57:27 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv24742/python/objects
Modified Files:
floatobject.c
Log Message:
float_int_div(): For clarity, move this closer to the other float
division functions, and rename to float_floor_div.
Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.108
retrieving revision 2.109
diff -C2 -d -r2.108 -r2.109
*** floatobject.c 2001/11/28 22:43:45 2.108
--- floatobject.c 2001/12/11 19:57:24 2.109
***************
*** 515,518 ****
--- 515,533 ----
static PyObject *
+ float_floor_div(PyObject *v, PyObject *w)
+ {
+ PyObject *t, *r;
+
+ t = float_divmod(v, w);
+ if (t != NULL) {
+ r = PyTuple_GET_ITEM(t, 0);
+ Py_INCREF(r);
+ Py_DECREF(t);
+ return r;
+ }
+ return NULL;
+ }
+
+ static PyObject *
float_pow(PyObject *v, PyObject *w, PyObject *z)
{
***************
*** 570,588 ****
static PyObject *
- float_int_div(PyObject *v, PyObject *w)
- {
- PyObject *t, *r;
-
- t = float_divmod(v, w);
- if (t != NULL) {
- r = PyTuple_GET_ITEM(t, 0);
- Py_INCREF(r);
- Py_DECREF(t);
- return r;
- }
- return NULL;
- }
-
- static PyObject *
float_neg(PyFloatObject *v)
{
--- 585,588 ----
***************
*** 758,762 ****
0, /* nb_inplace_xor */
0, /* nb_inplace_or */
! float_int_div, /* nb_floor_divide */
float_div, /* nb_true_divide */
0, /* nb_inplace_floor_divide */
--- 758,762 ----
0, /* nb_inplace_xor */
0, /* nb_inplace_or */
! float_floor_div, /* nb_floor_divide */
float_div, /* nb_true_divide */
0, /* nb_inplace_floor_divide */