File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ shash_is_empty(const struct shash *shash)
5858 return hmap_is_empty (& shash -> map );
5959}
6060
61+ size_t
62+ shash_count (const struct shash * shash )
63+ {
64+ return hmap_count (& shash -> map );
65+ }
66+
6167/* It is the caller's responsibility to avoid duplicate names, if that is
6268 * desirable. */
6369struct shash_node *
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ void shash_init(struct shash *);
4242void shash_destroy (struct shash * );
4343void shash_clear (struct shash * );
4444bool shash_is_empty (const struct shash * );
45+ size_t shash_count (const struct shash * );
4546struct shash_node * shash_add (struct shash * , const char * , void * );
4647void shash_delete (struct shash * , struct shash_node * );
4748struct shash_node * shash_find (const struct shash * , const char * );
You can’t perform that action at this time.
0 commit comments