]> granicus.if.org Git - python/commitdiff
Pass a variable that actually exists to PyFPE_END_PROTECT in
authorMichael W. Hudson <mwh@python.net>
Thu, 26 Feb 2004 12:33:09 +0000 (12:33 +0000)
committerMichael W. Hudson <mwh@python.net>
Thu, 26 Feb 2004 12:33:09 +0000 (12:33 +0000)
float_richcompare.  Reported on c.l.py by Helmut Jarausch.

Objects/floatobject.c

index 3f06b4c6243992e37dfed1dd177e5665dfd40f94..87395515f8876475816c6fe5f017977d179e9056 100644 (file)
@@ -390,7 +390,7 @@ float_richcompare(PyObject *v, PyObject *w, int op)
                r = i>j;
                break;
        }
-       PyFPE_END_PROTECT(a)
+       PyFPE_END_PROTECT(r)
        return PyBool_FromLong(r);
 }
 
@@ -852,7 +852,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 */