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/complexobject.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'Objects/complexobject.c') diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 5c84eff1db..f0915dd143 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -381,27 +381,6 @@ complex_div(PyComplexObject *v, PyComplexObject *w) return PyComplex_FromCComplex(quot); } -static PyObject * -complex_classic_div(PyComplexObject *v, PyComplexObject *w) -{ - Py_complex quot; - - if (Py_DivisionWarningFlag >= 2 && - PyErr_Warn(PyExc_DeprecationWarning, - "classic complex division") < 0) - return NULL; - - PyFPE_START_PROTECT("complex_classic_div", return 0) - errno = 0; - quot = c_quot(v->cval,w->cval); - PyFPE_END_PROTECT(quot) - if (errno == EDOM) { - PyErr_SetString(PyExc_ZeroDivisionError, "complex division"); - return NULL; - } - return PyComplex_FromCComplex(quot); -} - static PyObject * complex_remainder(PyComplexObject *v, PyComplexObject *w) { @@ -948,7 +927,6 @@ static PyNumberMethods complex_as_number = { (binaryfunc)complex_add, /* nb_add */ (binaryfunc)complex_sub, /* nb_subtract */ (binaryfunc)complex_mul, /* nb_multiply */ - (binaryfunc)complex_classic_div, /* nb_divide */ (binaryfunc)complex_remainder, /* nb_remainder */ (binaryfunc)complex_divmod, /* nb_divmod */ (ternaryfunc)complex_pow, /* nb_power */ @@ -971,7 +949,6 @@ static PyNumberMethods complex_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