summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-27 22:15:35 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-27 22:15:35 -0700
commit2f30ecd05f7e5b9f78f256f75677530c501e5a6d (patch)
treea7466caa2d9a8a4b6ffb76e785edac70950caa5e /src/alloc.c
parent2a866e7b9881176980c0a4acb998e1625aabf87f (diff)
downloademacs-2f30ecd05f7e5b9f78f256f75677530c501e5a6d.tar.gz
emacs-2f30ecd05f7e5b9f78f256f75677530c501e5a6d.tar.bz2
emacs-2f30ecd05f7e5b9f78f256f75677530c501e5a6d.zip
* 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.
Diffstat (limited to 'src/alloc.c')
0 files changed, 0 insertions, 0 deletions