diff options
author | Michael W. Hudson <mwh@python.net> | 2004-02-26 12:33:09 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2004-02-26 12:33:09 (GMT) |
commit | 957f9774b68076e0b549435b4061143936426fe2 (patch) | |
tree | dee70b8048f5ea60bfa8ccedaa079bbed9a54282 | |
parent | a7befda8d80d759cb88ef6732581860166ecf438 (diff) | |
download | cpython-957f9774b68076e0b549435b4061143936426fe2.zip cpython-957f9774b68076e0b549435b4061143936426fe2.tar.gz cpython-957f9774b68076e0b549435b4061143936426fe2.tar.bz2 |
Pass a variable that actually exists to PyFPE_END_PROTECT in
float_richcompare. Reported on c.l.py by Helmut Jarausch.
-rw-r--r-- | Objects/floatobject.c | 4 |
1 files 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 */ |