Mercurial > cpython-lru_cache-weakref
diff Modules/_struct.c @ 38530:447a94b039de legacy-trunk
Repaired error in new comment.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Wed, 31 May 2006 15:34:37 +0000 |
| parents | a7f2295a78ac |
| children | a114003aa3d3 |
line wrap: on
line diff
--- a/Modules/_struct.c Wed May 31 15:33:22 2006 +0000 +++ b/Modules/_struct.c Wed May 31 15:34:37 2006 +0000 @@ -311,10 +311,10 @@ /* 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);
