# HG changeset patch # User Stefan Monnier # Date 1069111789 0 # Node ID 86e42266b65e77bbcd8f293aca7e040b681822bb # Parent 4ccaea0e450cef0a7b2295f4aaaffb9d6a878701 (hashfn_eq, hashfn_eql, hashfn_equal, hash_put) (sxhash_string, sxhash): Use INTMASK instead of VALMASK. (maybe_resize_hash_table): Use MOST_POSITIVE_FIXNUM. diff -r 4ccaea0e450c -r 86e42266b65e src/fns.c --- 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; }