From 957f9774b68076e0b549435b4061143936426fe2 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Thu, 26 Feb 2004 12:33:09 +0000 Subject: Pass a variable that actually exists to PyFPE_END_PROTECT in float_richcompare. Reported on c.l.py by Helmut Jarausch. --- Objects/floatobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 3f06b4c..8739551 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -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 */ -- cgit v0.12