gh-120026: soft deprecate Py_HUGE_VAL macro (#120027)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Sergey B Kirpichev 2024-11-02 01:04:31 +03:00 committed by GitHub
parent 28b148fb32
commit 8477951a1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 23 additions and 18 deletions

View file

@ -33,7 +33,7 @@ extern "C" {
static inline void _Py_ADJUST_ERANGE1(double x)
{
if (errno == 0) {
if (x == Py_HUGE_VAL || x == -Py_HUGE_VAL) {
if (x == Py_INFINITY || x == -Py_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_HUGE_VAL || x == -Py_HUGE_VAL ||
y == Py_HUGE_VAL || y == -Py_HUGE_VAL)
if (x == Py_INFINITY || x == -Py_INFINITY ||
y == Py_INFINITY || y == -Py_INFINITY)
{
if (errno == 0) {
errno = ERANGE;