[Python-checkins] r46358 - python/trunk/Modules/_struct.c
tim.peters
python-checkins at python.org
Fri May 26 18:49:29 CEST 2006
Author: tim.peters
Date: Fri May 26 18:49:28 2006
New Revision: 46358
Modified:
python/trunk/Modules/_struct.c
Log:
Repair Windows compiler warnings about mixing
signed and unsigned integral types in comparisons.
Modified: python/trunk/Modules/_struct.c
==============================================================================
--- python/trunk/Modules/_struct.c (original)
+++ python/trunk/Modules/_struct.c Fri May 26 18:49:28 2006
@@ -763,7 +763,7 @@
return -1;
i = f->size;
#ifdef PY_STRUCT_RANGE_CHECKING
- if (i != SIZEOF_LONG && x >= (1 << (((unsigned int)i) * 8)))
+ if (i != SIZEOF_LONG && x >= (1U << (((unsigned int)i) * 8)))
return _range_error(f->format, f->size, 1);
#endif
do {
@@ -975,7 +975,7 @@
return -1;
i = f->size;
#ifdef PY_STRUCT_RANGE_CHECKING
- if (i != SIZEOF_LONG && x >= (1 << (((unsigned int)i) * 8)))
+ if (i != SIZEOF_LONG && x >= (1U << (((unsigned int)i) * 8)))
return _range_error(f->format, f->size, 1);
#endif
do {
More information about the Python-checkins
mailing list