diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2018-09-22 15:44:18 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2018-09-22 15:44:18 +0200 |
commit | 1259dc211ef544ce825cc52ee313eac638e2bbd2 (patch) | |
tree | 9a9af8d7a3fec713be7adf5b8c16f1588fa82093 /Cython | |
parent | 2a8dd0c02feaf7a75513017c1c1040b7ce6542ff (diff) | |
download | cython-1259dc211ef544ce825cc52ee313eac638e2bbd2.tar.gz |
Declare constants in "libc.math" with "const" modifier to detect/avoid assignments etc.
Closes #2621.
Diffstat (limited to 'Cython')
-rw-r--r-- | Cython/Includes/libc/math.pxd | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Cython/Includes/libc/math.pxd b/Cython/Includes/libc/math.pxd index de8d23330..eef9e660a 100644 --- a/Cython/Includes/libc/math.pxd +++ b/Cython/Includes/libc/math.pxd @@ -1,27 +1,27 @@ cdef extern from "<math.h>" nogil: - double M_E - double e "M_E" # as in Python's math module - double M_LOG2E - double M_LOG10E - double M_LN2 - double M_LN10 - double M_PI - double pi "M_PI" # as in Python's math module - double M_PI_2 - double M_PI_4 - double M_1_PI - double M_2_PI - double M_2_SQRTPI - double M_SQRT2 - double M_SQRT1_2 + const double M_E + const double e "M_E" # as in Python's math module + const double M_LOG2E + const double M_LOG10E + const double M_LN2 + const double M_LN10 + const double M_PI + const double pi "M_PI" # as in Python's math module + const double M_PI_2 + const double M_PI_4 + const double M_1_PI + const double M_2_PI + const double M_2_SQRTPI + const double M_SQRT2 + const double M_SQRT1_2 # C99 constants - float INFINITY - float NAN + const float INFINITY + const float NAN # note: not providing "nan" and "inf" aliases here as nan() is a function in C - double HUGE_VAL - float HUGE_VALF - long double HUGE_VALL + const double HUGE_VAL + const float HUGE_VALF + const long double HUGE_VALL double acos(double x) double asin(double x) |