[Python-checkins] r74575 - in python/trunk/Objects: stringobject.c unicodeobject.c
mark.dickinson
python-checkins at python.org
Fri Aug 28 22:46:24 CEST 2009
Author: mark.dickinson
Date: Fri Aug 28 22:46:24 2009
New Revision: 74575
Log:
Silence gcc 'comparison always false' warning
Modified:
python/trunk/Objects/stringobject.c
python/trunk/Objects/unicodeobject.c
Modified: python/trunk/Objects/stringobject.c
==============================================================================
--- python/trunk/Objects/stringobject.c (original)
+++ python/trunk/Objects/stringobject.c Fri Aug 28 22:46:24 2009
@@ -4341,14 +4341,16 @@
}
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';
Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c (original)
+++ python/trunk/Objects/unicodeobject.c Fri Aug 28 22:46:24 2009
@@ -8325,14 +8325,16 @@
return -1;
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';
More information about the Python-checkins
mailing list