diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-23 15:56:52 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-23 15:56:52 +0000 |
commit | 21a7d507af929dfa8960de197a4fe936f5294c20 (patch) | |
tree | 3ad8d02ae08a5e2403f87cba3849031590ae8f60 /include/hashtab.h | |
parent | a7dea2456b830671cf6720f54876738c792eecdb (diff) | |
download | gcc-21a7d507af929dfa8960de197a4fe936f5294c20.tar.gz |
1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
* hashtab.c (find_hash_table_entry): When returning a
DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
(clear_hash_table_slot): New function which deletes an entry
by its position in the table, not its value.
(traverse_hash_table): New function which calls a hook
function for every live entry in the table.
* hashtab.h: Give hash_table_t a struct tag. Add prototypes
for clear_hash_table_slot and traverse_hash_table. Correct
prototype of all_hash_table_collisions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/hashtab.h')
-rw-r--r-- | include/hashtab.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/hashtab.h b/include/hashtab.h index 67c37a284f7..3990c14cbca 100644 --- a/include/hashtab.h +++ b/include/hashtab.h @@ -47,7 +47,7 @@ typedef const void *hash_table_entry_t; tables. All work with hash table should be executed only through functions mentioned below. */ -typedef struct +typedef struct hash_table { /* Current size (in entries) of the hash table */ size_t size; @@ -88,13 +88,19 @@ extern hash_table_entry_t *find_hash_table_entry extern void remove_element_from_hash_table_entry PARAMS ((hash_table_t, hash_table_entry_t)); +extern void clear_hash_table_slot PARAMS ((hash_table_t, hash_table_entry_t *)); + +extern void traverse_hash_table PARAMS ((hash_table_t, + int (*) (hash_table_entry_t, void *), + void *)); + extern size_t hash_table_size PARAMS ((hash_table_t)); extern size_t hash_table_elements_number PARAMS ((hash_table_t)); extern int hash_table_collisions PARAMS ((hash_table_t)); -extern int all_hash_table_collisions (); +extern int all_hash_table_collisions PARAMS ((void)); #ifdef __cplusplus } |