summaryrefslogtreecommitdiffstats
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-24 08:14:36 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-24 08:14:36 (GMT)
commitbcc0db82dc9cb474d56a4cc63748583232d9524f (patch)
tree0107d20b29b61fc7dfd9626ee7257242f8cf6302 /Objects/complexobject.c
parented483ba63b9c03845386976bccff5d95df5b570a (diff)
downloadcpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.zip
cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.tar.gz
cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.tar.bz2
Get rid of remnants of integer division
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r--Objects/complexobject.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 5c84eff..f0915dd 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -382,27 +382,6 @@ complex_div(PyComplexObject *v, PyComplexObject *w)
}
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)
{
Py_complex div, mod;
@@ -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 */