Commit 3edc8cf4 authored by Michael W. Hudson's avatar Michael W. Hudson

Remove float_compare as per

[ 899109 ] 1==float('nan')

which can now finally be closed, I think.
parent 544f94c1
...@@ -352,14 +352,6 @@ float_str(PyFloatObject *v) ...@@ -352,14 +352,6 @@ float_str(PyFloatObject *v)
return PyString_FromString(buf); 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* static PyObject*
float_richcompare(PyObject *v, PyObject *w, int op) float_richcompare(PyObject *v, PyObject *w, int op)
{ {
...@@ -852,7 +844,7 @@ PyTypeObject PyFloat_Type = { ...@@ -852,7 +844,7 @@ PyTypeObject PyFloat_Type = {
(printfunc)float_print, /* tp_print */ (printfunc)float_print, /* tp_print */
0, /* tp_getattr */ 0, /* tp_getattr */
0, /* tp_setattr */ 0, /* tp_setattr */
(cmpfunc)float_compare, /* tp_compare */ 0, /* tp_compare */
(reprfunc)float_repr, /* tp_repr */ (reprfunc)float_repr, /* tp_repr */
&float_as_number, /* tp_as_number */ &float_as_number, /* tp_as_number */
0, /* tp_as_sequence */ 0, /* tp_as_sequence */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment