Mercurial > emacs
changeset 53090:86e42266b65e
(hashfn_eq, hashfn_eql, hashfn_equal, hash_put)
(sxhash_string, sxhash): Use INTMASK instead of VALMASK.
(maybe_resize_hash_table): Use MOST_POSITIVE_FIXNUM.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 17 Nov 2003 23:29:49 +0000 |
parents | 4ccaea0e450c |
children | a92809bb2b30 |
files | src/fns.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Mon Nov 17 23:29:40 2003 +0000 +++ b/src/fns.c Mon Nov 17 23:29:49 2003 +0000 @@ -4274,7 +4274,7 @@ Lisp_Object key; { unsigned hash = XUINT (key) ^ XGCTYPE (key); - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); return hash; } @@ -4293,7 +4293,7 @@ hash = sxhash (key, 0); else hash = XUINT (key) ^ XGCTYPE (key); - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); return hash; } @@ -4308,7 +4308,7 @@ Lisp_Object key; { unsigned hash = sxhash (key, 0); - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); return hash; } @@ -4495,7 +4495,7 @@ index_size = next_almost_prime ((int) (new_size / XFLOATINT (h->rehash_threshold))); - if (max (index_size, 2 * new_size) & ~VALMASK) + if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM) error ("Hash table too large to resize"); h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); @@ -4585,7 +4585,7 @@ { int start_of_bucket, i; - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); /* Increment count after resizing because resizing may fail. */ maybe_resize_hash_table (h); @@ -4870,7 +4870,7 @@ hash = ((hash << 3) + (hash >> 28) + c); } - return hash & VALMASK; + return hash & INTMASK; } @@ -4938,7 +4938,7 @@ /* Return a hash code for OBJ. DEPTH is the current depth in the Lisp - structure. Value is an unsigned integer clipped to VALMASK. */ + structure. Value is an unsigned integer clipped to INTMASK. */ unsigned sxhash (obj, depth) @@ -5002,7 +5002,7 @@ abort (); } - return hash & VALMASK; + return hash & INTMASK; }