diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-29 07:57:59 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-29 07:57:59 (GMT) |
commit | ca810467a4db78781c5e35100024cae779e954e5 (patch) | |
tree | 6f9bad18c0b52f59cafe039de83d8002018b8ba0 /Objects/longobject.c | |
parent | 378b2c9a037bccdbcaca32541c1baebb1a0de30a (diff) | |
download | cpython-ca810467a4db78781c5e35100024cae779e954e5.zip cpython-ca810467a4db78781c5e35100024cae779e954e5.tar.gz cpython-ca810467a4db78781c5e35100024cae779e954e5.tar.bz2 |
Get rid of more coerce cruft (really check in this time :-)
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index ab8a8d7..87082cb 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -3158,22 +3158,6 @@ long_or(PyObject *v, PyObject *w) return c; } -static int -long_coerce(PyObject **pv, PyObject **pw) -{ - if (PyInt_Check(*pw)) { - *pw = PyLong_FromLong(PyInt_AS_LONG(*pw)); - Py_INCREF(*pv); - return 0; - } - else if (PyLong_Check(*pw)) { - Py_INCREF(*pv); - Py_INCREF(*pw); - return 0; - } - return 1; /* Can't do it */ -} - static PyObject * long_long(PyObject *v) { @@ -3330,7 +3314,7 @@ static PyNumberMethods long_as_number = { long_and, /*nb_and*/ long_xor, /*nb_xor*/ long_or, /*nb_or*/ - long_coerce, /*nb_coerce*/ + 0, /*nb_coerce*/ long_int, /*nb_int*/ long_long, /*nb_long*/ long_float, /*nb_float*/ |