merge from gcc
authorDJ Delorie <dj@redhat.com>
Tue, 13 Apr 2004 15:23:19 +0000 (15:23 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 13 Apr 2004 15:23:19 +0000 (15:23 +0000)
include/ChangeLog
include/hashtab.h
libiberty/ChangeLog
libiberty/hashtab.c

index 883088ea6dff13cb16cfd0a91ef6e6a341aa132a..e2b5e891858151ecbbf9ac6074a5a63a489add2a 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-13  Jeff Law  <law@redhat.com>
+
+       * hashtab.h (htab_remove_elt_with_hash): Prototype new function.
+
 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
 
        * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
index 1af7368d338bd44cdc462b7ecdb31784c8e70b6b..a2ef32c36ae20de469d2d834924171a6ed026705 100644 (file)
@@ -166,6 +166,7 @@ extern PTR     *htab_find_slot_with_hash  PARAMS ((htab_t, const void *,
                                                   enum insert_option));
 extern void    htab_clear_slot PARAMS ((htab_t, void **));
 extern void    htab_remove_elt PARAMS ((htab_t, void *));
+extern void    htab_remove_elt_with_hash PARAMS ((htab_t, void *, hashval_t));
 
 extern void    htab_traverse   PARAMS ((htab_t, htab_trav, void *));
 extern void    htab_traverse_noresize  PARAMS ((htab_t, htab_trav, void *));
index 661ca4b45b98deb813acfa5236cbcaeaf96d373e..7da2d46d60820fe3385af408385ffa5ca433cbc8 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-13  Jeff Law  <law@redhat.com>
+
+       * hashtab.c (htab_remove_elt_with_hash): New function.
+       (htab_remove_elt): Implement in terms of htab_remove_elt_with_hash.
+
 2004-03-31  Richard Henderson  <rth@redhat.com>
 
        * hashtab.c (htab_size): Move to top of file; mark inline.
index f7751664f04fd8e83e5db54bf1b05c4d49ac2162..2639428df9c6f9b43162e599d4fad6833d81f991 100644 (file)
@@ -599,18 +599,32 @@ htab_find_slot (htab, element, insert)
                                   insert);
 }
 
+/* This function deletes an element with the given value from hash
+   table (the hash is computed from the element).  If there is no matching
+   element in the hash table, this function does nothing.  */
+
+void
+htab_remove_elt (htab, element)
+     htab_t htab;
+     PTR element;
+{
+  htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element));
+}
+
+
 /* This function deletes an element with the given value from hash
    table.  If there is no matching element in the hash table, this
    function does nothing.  */
 
 void
-htab_remove_elt (htab, element)
+htab_remove_elt_with_hash (htab, element, hash)
      htab_t htab;
      PTR element;
+     hashval_t hash;
 {
   PTR *slot;
 
-  slot = htab_find_slot (htab, element, NO_INSERT);
+  slot = htab_find_slot_with_hash (htab, element, hash, NO_INSERT);
   if (*slot == EMPTY_ENTRY)
     return;
 
This page took 0.031177 seconds and 4 git commands to generate.