diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-11 23:09:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 23:09:40 +0200 |
commit | 7103356455c8b0c2ba3523929327756413337a31 (patch) | |
tree | 7fc7286a502fe00cf42bd2f9c6759064f0f6df82 /Include/pymath.h | |
parent | a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7 (diff) | |
download | cpython-git-7103356455c8b0c2ba3523929327756413337a31.tar.gz |
bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882)
Move the following macros , to pycore_pymath.h (internal C API):
* _Py_SET_53BIT_PRECISION_HEADER
* _Py_SET_53BIT_PRECISION_START
* _Py_SET_53BIT_PRECISION_END
PEP 7: add braces to if and "do { ... } while (0)" in these macros.
Move also _Py_get_387controlword() and _Py_set_387controlword()
definitions to pycore_pymath.h. These functions are no longer
exported.
pystrtod.c now includes pycore_pymath.h.
Diffstat (limited to 'Include/pymath.h')
-rw-r--r-- | Include/pymath.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Include/pymath.h b/Include/pymath.h index 39a0bdad98..2f47f87434 100644 --- a/Include/pymath.h +++ b/Include/pymath.h @@ -78,13 +78,6 @@ PyAPI_FUNC(double) _Py_force_double(double); #endif #endif -#ifndef Py_LIMITED_API -#ifdef HAVE_GCC_ASM_FOR_X87 -PyAPI_FUNC(unsigned short) _Py_get_387controlword(void); -PyAPI_FUNC(void) _Py_set_387controlword(unsigned short); -#endif -#endif - /* Py_IS_NAN(X) * Return 1 if float or double arg is a NaN, else 0. * Caution: @@ -95,11 +88,11 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short); * Note: PC/pyconfig.h defines Py_IS_NAN as _isnan */ #ifndef Py_IS_NAN -#if defined HAVE_DECL_ISNAN && HAVE_DECL_ISNAN == 1 -#define Py_IS_NAN(X) isnan(X) -#else -#define Py_IS_NAN(X) ((X) != (X)) -#endif +# if defined HAVE_DECL_ISNAN && HAVE_DECL_ISNAN == 1 +# define Py_IS_NAN(X) isnan(X) +# else +# define Py_IS_NAN(X) ((X) != (X)) +# endif #endif /* Py_IS_INFINITY(X) |