emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fns.c


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/fns.c
Date: Mon, 17 Nov 2003 18:29:51 -0500

Index: emacs/src/fns.c
diff -c emacs/src/fns.c:1.345 emacs/src/fns.c:1.346
*** emacs/src/fns.c:1.345       Wed Nov 12 12:05:37 2003
--- emacs/src/fns.c     Mon Nov 17 18:29:49 2003
***************
*** 4274,4280 ****
       Lisp_Object key;
  {
    unsigned hash = XUINT (key) ^ XGCTYPE (key);
!   xassert ((hash & ~VALMASK) == 0);
    return hash;
  }
  
--- 4274,4280 ----
       Lisp_Object key;
  {
    unsigned hash = XUINT (key) ^ XGCTYPE (key);
!   xassert ((hash & ~INTMASK) == 0);
    return hash;
  }
  
***************
*** 4293,4299 ****
      hash = sxhash (key, 0);
    else
      hash = XUINT (key) ^ XGCTYPE (key);
!   xassert ((hash & ~VALMASK) == 0);
    return hash;
  }
  
--- 4293,4299 ----
      hash = sxhash (key, 0);
    else
      hash = XUINT (key) ^ XGCTYPE (key);
!   xassert ((hash & ~INTMASK) == 0);
    return hash;
  }
  
***************
*** 4308,4314 ****
       Lisp_Object key;
  {
    unsigned hash = sxhash (key, 0);
!   xassert ((hash & ~VALMASK) == 0);
    return hash;
  }
  
--- 4308,4314 ----
       Lisp_Object key;
  {
    unsigned hash = sxhash (key, 0);
!   xassert ((hash & ~INTMASK) == 0);
    return hash;
  }
  
***************
*** 4495,4501 ****
        index_size = next_almost_prime ((int)
                                      (new_size
                                       / XFLOATINT (h->rehash_threshold)));
!       if (max (index_size, 2 * new_size) & ~VALMASK)
        error ("Hash table too large to resize");
  
        h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil);
--- 4495,4501 ----
        index_size = next_almost_prime ((int)
                                      (new_size
                                       / XFLOATINT (h->rehash_threshold)));
!       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,4591 ****
  {
    int start_of_bucket, i;
  
!   xassert ((hash & ~VALMASK) == 0);
  
    /* Increment count after resizing because resizing may fail.  */
    maybe_resize_hash_table (h);
--- 4585,4591 ----
  {
    int start_of_bucket, i;
  
!   xassert ((hash & ~INTMASK) == 0);
  
    /* Increment count after resizing because resizing may fail.  */
    maybe_resize_hash_table (h);
***************
*** 4870,4876 ****
        hash = ((hash << 3) + (hash >> 28) + c);
      }
  
!   return hash & VALMASK;
  }
  
  
--- 4870,4876 ----
        hash = ((hash << 3) + (hash >> 28) + c);
      }
  
!   return hash & INTMASK;
  }
  
  
***************
*** 4938,4944 ****
  
  
  /* Return a hash code for OBJ.  DEPTH is the current depth in the Lisp
!    structure.  Value is an unsigned integer clipped to VALMASK.  */
  
  unsigned
  sxhash (obj, depth)
--- 4938,4944 ----
  
  
  /* Return a hash code for OBJ.  DEPTH is the current depth in the Lisp
!    structure.  Value is an unsigned integer clipped to INTMASK.  */
  
  unsigned
  sxhash (obj, depth)
***************
*** 5002,5008 ****
        abort ();
      }
  
!   return hash & VALMASK;
  }
  
  
--- 5002,5008 ----
        abort ();
      }
  
!   return hash & INTMASK;
  }
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]