diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-11-23 07:48:13 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-11-23 07:48:13 +0000 |
commit | 05482a08990a1603c3a6beed6bd1e6806ee4422e (patch) | |
tree | 1c530381d35935b1f50feb88e55e25ab026d6bd8 /src/common/container.c | |
parent | 0118a236a4fa3b3cbc5d3869e7ddc65f9a2480e3 (diff) | |
download | tor-05482a08990a1603c3a6beed6bd1e6806ee4422e.tar.gz tor-05482a08990a1603c3a6beed6bd1e6806ee4422e.zip |
Add functions to return number of elts in associative containers
svn:r5448
Diffstat (limited to 'src/common/container.c')
-rw-r--r-- | src/common/container.c | 12 |
1 files changed, 12 insertions, 0 deletions
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); +} + |