return count;
}
+static int
+_virHashRemoveAllIter(const void *payload ATTRIBUTE_UNUSED,
+ const void *name ATTRIBUTE_UNUSED,
+ const void *data ATTRIBUTE_UNUSED)
+{
+ return 1;
+}
+
+/**
+ * virHashRemoveAll
+ * @table: the hash table to clear
+ *
+ * Free the hash @table's contents. The userdata is
+ * deallocated with the function provided at creation time.
+ *
+ * Returns the number of items removed on success, -1 on failure
+ */
+ssize_t
+virHashRemoveAll(virHashTablePtr table)
+{
+ return virHashRemoveSet(table,
+ _virHashRemoveAllIter,
+ NULL);
+}
+
/**
* virHashSearch:
* @table: the hash table to search
int virHashRemoveEntry(virHashTablePtr table,
const void *name);
+/*
+ * Remove all entries from the hash table.
+ */
+ssize_t virHashRemoveAll(virHashTablePtr table);
+
/*
* Retrieve the userdata.
*/