X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fhash.c;h=edd1302bbb31dc67b996ba6b9b1b2920a4600398;hb=26547d3987daa8f4aa6176492fd5f6cb99f7cf86;hp=38bc284ae59c3c1b8f6d05b1947ade5dc4457e1f;hpb=b5788b5eb7b66948b38e95d5df0f7d631a51bf2a;p=wget diff --git a/src/hash.c b/src/hash.c index 38bc284a..edd1302b 100644 --- a/src/hash.c +++ b/src/hash.c @@ -458,6 +458,15 @@ hash_table_map (struct hash_table *ht, return; } } + +/* Return the number of elements in the hash table. This is not the + same as the physical size of the hash table, which is always + greater than the number of elements. */ +int +hash_table_count (struct hash_table *ht) +{ + return ht->count; +} /* Support for hash tables whose keys are strings. */