[pypy-issue] Issue #2822: Py_IS_NAN, Py_IS_FINITE, Py_IS_INFINITY missing (pypy/pypy)

Hrvoje Nikšić issues-reply at bitbucket.org
Fri May 4 04:23:06 EDT 2018


New issue 2822: Py_IS_NAN, Py_IS_FINITE, Py_IS_INFINITY missing
https://bitbucket.org/pypy/pypy/issues/2822/py_is_nan-py_is_finite-py_is_infinity

Hrvoje Nikšić:

Some C extensions use `Py_IS_NAN`, `Py_IS_FINITE`, and `Py_IS_INFINITY` as portable means to access those properties across platforms supported by Python.

It is fairly easy to work around the lack of these macros, as modern C and C++ provide equivalent functionality in the standard library. Still, Python/C extensions using them will not compile out of the box under PyPy, so I am reporting this as a minor issue.

A possible fix might be simply to synchronize `pymath.h` with the latest CPython incarnation. The PyPy version appears to be imported from an earlier CPython source that only contained `Py_NAN`, while the latest one also contains the above mentioned macros, and also `Py_OVERFLOWED`,  `Py_NAN`, `Py_HUGE_VAL`, `Py_MATH_E`, `Py_MATH_El`, `Py_MATH_PI`, and `Py_MATH_PIl`.




More information about the pypy-issue mailing list