summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-23 15:56:52 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-23 15:56:52 +0000
commit21a7d507af929dfa8960de197a4fe936f5294c20 (patch)
tree3ad8d02ae08a5e2403f87cba3849031590ae8f60 /include
parenta7dea2456b830671cf6720f54876738c792eecdb (diff)
downloadppe42-gcc-21a7d507af929dfa8960de197a4fe936f5294c20.tar.gz
ppe42-gcc-21a7d507af929dfa8960de197a4fe936f5294c20.zip
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')
-rw-r--r--include/ChangeLog6
-rw-r--r--include/hashtab.h10
2 files changed, 14 insertions, 2 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index cfaab0aac81..545574f9f27 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
+
+ * 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.
+
Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
* hashtab.h: New file.
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
}
OpenPOWER on IntegriCloud