mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
bpo-42323: Fix math.nextafter() on AIX (GH-24381)
math_nextafter_impl() must return a Python object, not a C double.
This commit is contained in:
@@ -3474,10 +3474,10 @@ math_nextafter_impl(PyObject *module, double x, double y)
|
||||
return PyFloat_FromDouble(y);
|
||||
}
|
||||
if (Py_IS_NAN(x)) {
|
||||
return x;
|
||||
return PyFloat_FromDouble(x);
|
||||
}
|
||||
if (Py_IS_NAN(y)) {
|
||||
return y;
|
||||
return PyFloat_FromDouble(y);
|
||||
}
|
||||
#endif
|
||||
return PyFloat_FromDouble(nextafter(x, y));
|
||||
|
||||
Reference in New Issue
Block a user