From: hniksic Date: Sun, 8 Apr 2001 02:09:04 +0000 (-0700) Subject: [svn] New function hash_table_count. X-Git-Tag: v1.13~2202 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=26547d3987daa8f4aa6176492fd5f6cb99f7cf86 [svn] New function hash_table_count. Published in . --- diff --git a/src/ChangeLog b/src/ChangeLog index da546b28..7f268572 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-04-08 Hrvoje Niksic + + * hash.c (hash_table_count): New function. + 2001-04-06 Hrvoje Niksic * utils.c (read_file): Cast MAP_FAILED to char *. Enforced by @@ -34,6 +38,7 @@ username was present, but the URL did not contain a slash, e.g. http://foo:bar@myhost. +>>>>>>> 1.148 2001-04-03 KOJIMA Hajime * http.c (http_atotm): Use %A instead of %a to match full 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. */