8000 bpo-42323: Fix math.nextafter() on AIX (GH-24381) · python/cpython@0837f99 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0837f99

Browse files
authored
bpo-42323: Fix math.nextafter() on AIX (GH-24381)
math_nextafter_impl() must return a Python object, not a C double.
1 parent 62949f6 commit 0837f99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/mathmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,10 +3474,10 @@ math_nextafter_impl(PyObject *module, double x, double y)
34743474
return PyFloat_FromDouble(y);
34753475
}
34763476
if (Py_IS_NAN(x)) {
3477-
return x;
3477+
return PyFloat_FromDouble(x);
34783478
}
34793479
if (Py_IS_NAN(y)) {
3480-
return y;
3480+
return PyFloat_FromDouble(y);
34813481
}
34823482
#endif
34833483
return PyFloat_FromDouble(nextafter(x, y));

0 commit comments

Comments
 (0)
0