summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-hash.c')
-rw-r--r--dbus/dbus-hash.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/dbus/dbus-hash.c b/dbus/dbus-hash.c
index fa2104b3..8eca2bd8 100644
--- a/dbus/dbus-hash.c
+++ b/dbus/dbus-hash.c
@@ -422,6 +422,22 @@ _dbus_hash_table_unref (DBusHashTable *table)
}
}
+/**
+ * Removed all entries from a hash table.
+ *
+ * @param table the hash table to remove all entries from.
+ */
+void
+_dbus_hash_table_remove_all (DBusHashTable *table)
+{
+ DBusHashIter iter;
+ _dbus_hash_iter_init (table, &iter);
+ while (_dbus_hash_iter_next (&iter))
+ {
+ _dbus_hash_iter_remove_entry(&iter);
+ }
+}
+
static DBusHashEntry*
alloc_entry (DBusHashTable *table)
{