mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141004: soft-deprecate Py_INFINITY macro (#141033)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
c6f3dd6a50
commit
e2026731f5
13 changed files with 45 additions and 36 deletions
|
|
@ -33,7 +33,7 @@ extern "C" {
|
|||
static inline void _Py_ADJUST_ERANGE1(double x)
|
||||
{
|
||||
if (errno == 0) {
|
||||
if (x == Py_INFINITY || x == -Py_INFINITY) {
|
||||
if (x == INFINITY || x == -INFINITY) {
|
||||
errno = ERANGE;
|
||||
}
|
||||
}
|
||||
|
|
@ -44,8 +44,8 @@ static inline void _Py_ADJUST_ERANGE1(double x)
|
|||
|
||||
static inline void _Py_ADJUST_ERANGE2(double x, double y)
|
||||
{
|
||||
if (x == Py_INFINITY || x == -Py_INFINITY ||
|
||||
y == Py_INFINITY || y == -Py_INFINITY)
|
||||
if (x == INFINITY || x == -INFINITY ||
|
||||
y == INFINITY || y == -INFINITY)
|
||||
{
|
||||
if (errno == 0) {
|
||||
errno = ERANGE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue