util/set: add a set_clear function
Clear a set back to the state of having zero entries.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
diff --git a/src/util/set.h b/src/util/set.h
index 9acd2c2..06e79e1 100644
--- a/src/util/set.h
+++ b/src/util/set.h
@@ -61,6 +61,9 @@
void
_mesa_set_destroy(struct set *set,
void (*delete_function)(struct set_entry *entry));
+void
+_mesa_set_clear(struct set *set,
+ void (*delete_function)(struct set_entry *entry));
struct set_entry *
_mesa_set_add(struct set *set, const void *key);