summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 8916552..2ae397a 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -4336,14 +4336,16 @@ formatfloat(char *buf, size_t buflen, int flags,
}
if (prec < 0)
prec = 6;
+#if SIZEOF_INT > 4
/* make sure that the decimal representation of precision really does
need at most 10 digits: platforms with sizeof(int) == 8 exist! */
- if (prec > 0x7fffffffL) {
+ if (prec > 0x7fffffff) {
PyErr_SetString(PyExc_OverflowError,
"outrageously large precision "
"for formatted float");
return -1;
}
+#endif
if (type == 'f' && fabs(x) >= 1e50)
type = 'g';