summaryrefslogtreecommitdiffstats
path: root/Python/pystrtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r--Python/pystrtod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 16bf06f..5c8be04 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -842,7 +842,7 @@ char * PyOS_double_to_string(double val,
*/
- if (Py_IS_NAN(val) || Py_IS_INFINITY(val))
+ if (isnan(val) || isinf(val))
/* 3 for 'inf'/'nan', 1 for sign, 1 for '\0' */
bufsize = 5;
else {
@@ -860,10 +860,10 @@ char * PyOS_double_to_string(double val,
}
/* Handle nan and inf. */
- if (Py_IS_NAN(val)) {
+ if (isnan(val)) {
strcpy(buf, "nan");
t = Py_DTST_NAN;
- } else if (Py_IS_INFINITY(val)) {
+ } else if (isinf(val)) {
if (copysign(1., val) == 1.)
strcpy(buf, "inf");
else