From 05482a08990a1603c3a6beed6bd1e6806ee4422e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 23 Nov 2005 07:48:13 +0000 Subject: Add functions to return number of elts in associative containers svn:r5448 --- src/common/container.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/common/container.c') diff --git a/src/common/container.c b/src/common/container.c index 241dd977d3..b5bb6cd0bf 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -859,3 +859,15 @@ digestmap_isempty(digestmap_t *map) return HT_EMPTY(&map->head); } +int +strmap_size(strmap_t *map) +{ + return HT_SIZE(&map->head); +} + +int +digestmap_size(digestmap_t *map) +{ + return HT_SIZE(&map->head); +} + -- cgit v1.2.3-54-g00ecf