diff options
Diffstat (limited to 'src/libutil/hash.c')
-rw-r--r-- | src/libutil/hash.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libutil/hash.c b/src/libutil/hash.c index b42dc6c51..d4fdfea46 100644 --- a/src/libutil/hash.c +++ b/src/libutil/hash.c @@ -697,4 +697,21 @@ rspamd_lru_hash_foreach (rspamd_lru_hash_t *h, int it, gpointer *k, } return i; +} + + +guint +rspamd_lru_hash_size (rspamd_lru_hash_t *hash) +{ + return kh_size (hash); +} + +/** + * Returns hash capacity + * @param hash hash object + */ +guint +rspamd_lru_hash_capacity (rspamd_lru_hash_t *hash) +{ + return hash->n_buckets; }
\ No newline at end of file |