Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 957f977

Browse files
author
Michael W. Hudson
committed
Pass a variable that actually exists to PyFPE_END_PROTECT in
float_richcompare. Reported on c.l.py by Helmut Jarausch.
1 parent a7befda commit 957f977

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/floatobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ float_richcompare(PyObject *v, PyObject *w, int op)
390390
r = i>j;
391391
break;
392392
}
393-
PyFPE_END_PROTECT(a)
393+
PyFPE_END_PROTECT(r)
394394
return PyBool_FromLong(r);
395395
}
396396

@@ -852,7 +852,7 @@ PyTypeObject PyFloat_Type = {
852852
(printfunc)float_print, /* tp_print */
853853
0, /* tp_getattr */
854854
0, /* tp_setattr */
855-
(cmpfunc)float_compare, /* tp_compare */
855+
0, /* tp_compare */
856856
(reprfunc)float_repr, /* tp_repr */
857857
&float_as_number, /* tp_as_number */
858858
0, /* tp_as_sequence */

0 commit comments

Comments
 (0)