* lread.c (hash_string): Use size_t, not int, for hash computation.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Apr 2011 05:15:35 +0000 (22:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Apr 2011 05:15:35 +0000 (22:15 -0700)
commit2f30ecd05f7e5b9f78f256f75677530c501e5a6d
treea7466caa2d9a8a4b6ffb76e785edac70950caa5e
parent2a866e7b9881176980c0a4acb998e1625aabf87f
* lread.c (hash_string): Use size_t, not int, for hash computation.

Normally we prefer signed values; but hashing is special, because
it's better to use unsigned division on hash table sizes so that
the remainder is nonnegative.  Also, size_t is the natural width
for hashing into memory.  The previous code used 'int', which doesn't
retain enough info to hash well into very large tables.
(oblookup, oblookup_last_bucket_number, Funintern): Likewise.
src/ChangeLog
src/lread.c