[Python-checkins] r74576 - in python/branches/release26-maint: Objects/stringobject.c Objects/unicodeobject.c
mark.dickinson
python-checkins at python.org
Fri Aug 28 22:57:43 CEST 2009
Author: mark.dickinson
Date: Fri Aug 28 22:57:42 2009
New Revision: 74576
Log:
Merged revisions 74575 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74575 | mark.dickinson | 2009-08-28 21:46:24 +0100 (Fri, 28 Aug 2009) | 1 line
Silence gcc 'comparison always false' warning
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Objects/stringobject.c
python/branches/release26-maint/Objects/unicodeobject.c
Modified: python/branches/release26-maint/Objects/stringobject.c
==============================================================================
--- python/branches/release26-maint/Objects/stringobject.c (original)
+++ python/branches/release26-maint/Objects/stringobject.c Fri Aug 28 22:57:42 2009
@@ -4336,14 +4336,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/branches/release26-maint/Objects/unicodeobject.c
==============================================================================
--- python/branches/release26-maint/Objects/unicodeobject.c (original)
+++ python/branches/release26-maint/Objects/unicodeobject.c Fri Aug 28 22:57:42 2009
@@ -8212,14 +8212,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