Right now there's no easy way to know if a hash table is empty,
which I'm going to need in a future commit.
This commit adds a get_size method to return the number of items in
the hash table.
}
}
+int
+ply_hashtable_get_size (ply_hashtable_t *hashtable)
+{
+ return hashtable->live_node_count;
+}
#ifdef PLY_HASHTABLE_ENABLE_TEST
#include <stdio.h>
void ply_hashtable_foreach (ply_hashtable_t *hashtable,
ply_hashtable_foreach_func_t func,
void *user_data);
+
+int ply_hashtable_get_size (ply_hashtable_t *hashtable);
#endif
#endif /* PLY_HASHTABLE_H */