From bcc0db82dc9cb474d56a4cc63748583232d9524f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 24 Mar 2006 08:14:36 +0000 Subject: Get rid of remnants of integer division --- Objects/floatobject.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'Objects/floatobject.c') diff --git a/Objects/floatobject.c b/Objects/floatobject.c index c27a41a060..20ed86e828 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -641,25 +641,6 @@ float_div(PyObject *v, PyObject *w) return PyFloat_FromDouble(a); } -static PyObject * -float_classic_div(PyObject *v, PyObject *w) -{ - double a,b; - CONVERT_TO_DOUBLE(v, a); - CONVERT_TO_DOUBLE(w, b); - if (Py_DivisionWarningFlag >= 2 && - PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0) - return NULL; - if (b == 0.0) { - PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - return NULL; - } - PyFPE_START_PROTECT("divide", return 0) - a = a / b; - PyFPE_END_PROTECT(a) - return PyFloat_FromDouble(a); -} - static PyObject * float_rem(PyObject *v, PyObject *w) { @@ -1128,7 +1109,6 @@ static PyNumberMethods float_as_number = { (binaryfunc)float_add, /*nb_add*/ (binaryfunc)float_sub, /*nb_subtract*/ (binaryfunc)float_mul, /*nb_multiply*/ - (binaryfunc)float_classic_div, /*nb_divide*/ (binaryfunc)float_rem, /*nb_remainder*/ (binaryfunc)float_divmod, /*nb_divmod*/ (ternaryfunc)float_pow, /*nb_power*/ @@ -1151,7 +1131,6 @@ static PyNumberMethods float_as_number = { 0, /* nb_inplace_add */ 0, /* nb_inplace_subtract */ 0, /* nb_inplace_multiply */ - 0, /* nb_inplace_divide */ 0, /* nb_inplace_remainder */ 0, /* nb_inplace_power */ 0, /* nb_inplace_lshift */ -- cgit v1.2.1