diff options
Diffstat (limited to 'lib/hash.c')
-rw-r--r-- | lib/hash.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/hash.c b/lib/hash.c index c0680e488..1ed3cc21a 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -255,11 +255,22 @@ curl_hash_clean(curl_hash *h) h->table = NULL; } +size_t +curl_hash_count(curl_hash *h) +{ + return h->size; +} + void curl_hash_destroy(curl_hash *h) { + if (!h) { + return; + } + curl_hash_clean(h); free(h); + h = NULL; } /* |