From 26547d3987daa8f4aa6176492fd5f6cb99f7cf86 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sat, 7 Apr 2001 19:09:04 -0700 Subject: [PATCH] [svn] New function hash_table_count. Published in . --- src/ChangeLog | 5 +++++ src/hash.c | 9 +++++++++ 2 files changed, 14 insertions(+) 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. */ -- 2.39.2