diff options
author | Michael W. Hudson <mwh@python.net> | 2004-05-26 17:36:12 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2004-05-26 17:36:12 (GMT) |
commit | 08678a1055b273ad7394f70ebfa17744ca1a6708 (patch) | |
tree | ac3779d529344ddf43ee714d78c30563fd3ba94a /Objects | |
parent | 76b8cc84a4b41b41525b00ff7243ed2f323bade1 (diff) | |
download | cpython-08678a1055b273ad7394f70ebfa17744ca1a6708.zip cpython-08678a1055b273ad7394f70ebfa17744ca1a6708.tar.gz cpython-08678a1055b273ad7394f70ebfa17744ca1a6708.tar.bz2 |
Remove float_compare as per
[ 899109 ] 1==float('nan')
which can now finally be closed, I think.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/floatobject.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index b3bcaa9..f1c8e42 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -352,14 +352,6 @@ float_str(PyFloatObject *v) return PyString_FromString(buf); } -static int -float_compare(PyFloatObject *v, PyFloatObject *w) -{ - double i = v->ob_fval; - double j = w->ob_fval; - return (i < j) ? -1 : (i > j) ? 1 : 0; -} - static PyObject* float_richcompare(PyObject *v, PyObject *w, int op) { @@ -852,7 +844,7 @@ PyTypeObject PyFloat_Type = { (printfunc)float_print, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ - (cmpfunc)float_compare, /* tp_compare */ + 0, /* tp_compare */ (reprfunc)float_repr, /* tp_repr */ &float_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ |