projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e2b54f
)
(hash_is_key_in_hash): Function somehow got lost.
author
Richard Kenner
<kenner@gcc.gnu.org>
Mon, 12 Aug 1996 02:25:20 +0000
(22:25 -0400)
committer
Richard Kenner
<kenner@gcc.gnu.org>
Mon, 12 Aug 1996 02:25:20 +0000
(22:25 -0400)
From-SVN: r12614
gcc/objc/hash.c
patch
|
blob
|
history
diff --git
a/gcc/objc/hash.c
b/gcc/objc/hash.c
index 67b97507bd61b612a721dbb18a954f0328a657ce..6d67aa00ab0d606ade393f5b186570cd151a16e2 100644
(file)
--- a/
gcc/objc/hash.c
+++ b/
gcc/objc/hash.c
@@
-251,3
+251,22
@@
hash_value_for_key (cache_ptr cache, const void *key)
return retval;
}
+
+/* Given KEY, return YES if it exists in the CACHE.
+ Return NO if it does not */
+
+BOOL
+hash_is_key_in_hash (cache_ptr cache, const void *key)
+{
+ node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)];
+
+ if (node)
+ do {
+ if ((*cache->compare_func)(node->key, key))
+ return YES;
+ else
+ node = node->next;
+ } while (node);
+
+ return NO;
+}