]> sjero.net Git - wget/blobdiff - src/hash.c
[svn] New function hash_table_count.
[wget] / src / hash.c
index 38bc284ae59c3c1b8f6d05b1947ade5dc4457e1f..edd1302bbb31dc67b996ba6b9b1b2920a4600398 100644 (file)
@@ -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;
+}
 \f
 /* Support for hash tables whose keys are strings.  */