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
|
|
@ -45,13 +45,14 @@
|
|||
#define Py_IS_FINITE(X) isfinite(X)
|
||||
|
||||
// Py_INFINITY: Value that evaluates to a positive double infinity.
|
||||
// Soft deprecated since Python 3.15, use INFINITY instead.
|
||||
#ifndef Py_INFINITY
|
||||
# define Py_INFINITY ((double)INFINITY)
|
||||
#endif
|
||||
|
||||
/* Py_HUGE_VAL should always be the same as Py_INFINITY. But historically
|
||||
* this was not reliable and Python did not require IEEE floats and C99
|
||||
* conformity. The macro was soft deprecated in Python 3.14, use Py_INFINITY instead.
|
||||
* conformity. The macro was soft deprecated in Python 3.14, use INFINITY instead.
|
||||
*/
|
||||
#ifndef Py_HUGE_VAL
|
||||
# define Py_HUGE_VAL HUGE_VAL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue