mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
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:
parent
28b148fb32
commit
8477951a1c
10 changed files with 23 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue