summaryrefslogtreecommitdiff
path: root/utils/hashmap.h
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-23 20:18:08 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-23 20:59:40 +0000
commit088917641f0865e11be5e81bf90de3dbc8cba19e (patch)
tree40209eeb6262b82b9bb252322345600f8cc50404 /utils/hashmap.h
parent3e02961ec8f21fd656c8b306c5075c0c799df97f (diff)
downloadnetsurf-088917641f0865e11be5e81bf90de3dbc8cba19e.tar.gz
netsurf-088917641f0865e11be5e81bf90de3dbc8cba19e.tar.bz2
utils: Add hashmap_count()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'utils/hashmap.h')
-rw-r--r--utils/hashmap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/hashmap.h b/utils/hashmap.h
index cb8fd5074..3968fd3fe 100644
--- a/utils/hashmap.h
+++ b/utils/hashmap.h
@@ -186,4 +186,12 @@ bool hashmap_remove(hashmap_t *hashmap, void *key);
*/
bool hashmap_iterate(hashmap_t *hashmap, hashmap_iteration_cb_t cb, void *ctx);
+/**
+ * Get the number of entries in this map
+ *
+ * \param hashmap The hashmap to retrieve the entry count from
+ * \return The number of entries in the hashmap
+ */
+size_t hashmap_count(hashmap_t *hashmap);
+
#endif