aboutsummaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/hash.h b/hash.h
index 8e7a567b6dba..8ff5490bdd95 100644
--- a/hash.h
+++ b/hash.h
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.h,v 1.40 2021/04/11 12:46:54 rillig Exp $ */
+/* $NetBSD: hash.h,v 1.41 2021/12/07 21:58:01 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -120,6 +120,15 @@ HashEntry_Set(HashEntry *h, void *datum)
h->value = datum;
}
+/* Set things up for iterating over all entries in the hash table. */
+MAKE_INLINE void
+HashIter_Init(HashIter *hi, HashTable *t)
+{
+ hi->table = t;
+ hi->nextBucket = 0;
+ hi->entry = NULL;
+}
+
void HashTable_Init(HashTable *);
void HashTable_Done(HashTable *);
HashEntry *HashTable_FindEntry(HashTable *, const char *);