summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-05-31 15:34:37 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-05-31 15:34:37 (GMT)
commit72270c220e465a81c89ad31b955ce9fa307df647 (patch)
tree50b7282fc38f23e6fa63d770dc82656ea56da65b
parentd6a6f023c82aeef295a2fcd764ae9380ea73156d (diff)
downloadcpython-72270c220e465a81c89ad31b955ce9fa307df647.zip
cpython-72270c220e465a81c89ad31b955ce9fa307df647.tar.gz
cpython-72270c220e465a81c89ad31b955ce9fa307df647.tar.bz2
Repaired error in new comment.
-rw-r--r--Modules/_struct.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 8065717..fd550c9 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -311,10 +311,10 @@ _range_error(const formatdef *f, int is_unsigned)
/* ulargest is the largest unsigned value with f->size bytes.
* Note that the simpler:
* ((size_t)1 << (f->size * 8)) - 1
- * doesn't work when f->size == size_t because C doesn't define what
- * happens when a left shift count is >= the number of bits in the
- * integer being shifted; e.g., on some boxes it doesn't shift at
- * all when they're equal.
+ * doesn't work when f->size == sizeof(size_t) because C doesn't
+ * define what happens when a left shift count is >= the number of
+ * bits in the integer being shifted; e.g., on some boxes it doesn't
+ * shift at all when they're equal.
*/
const size_t ulargest = (size_t)-1 >> ((SIZEOF_SIZE_T - f->size)*8);
assert(f->size >= 1 && f->size <= SIZEOF_SIZE_T);