On Mon, Jan 11, 2016 at 6:32 PM, Nicolai Hähnle <[email protected]> wrote: > From: Nicolai Hähnle <[email protected]> > > Reviewed-by: Ian Romanick <[email protected]> > --- > src/util/hash_table.c | 25 ++++++++++ > src/util/hash_table.h | 2 + > src/util/tests/hash_table/Makefile.am | 1 + > src/util/tests/hash_table/clear.c | 91 > +++++++++++++++++++++++++++++++++++ > 4 files changed, 119 insertions(+) > create mode 100644 src/util/tests/hash_table/clear.c > > diff --git a/src/util/hash_table.c b/src/util/hash_table.c > index 3247593..d74e74a 100644 > --- a/src/util/hash_table.c > +++ b/src/util/hash_table.c > @@ -163,6 +163,31 @@ _mesa_hash_table_destroy(struct hash_table *ht, > ralloc_free(ht); > } > > +/** > + * Deletes all entries of the given hash table without deleting the table > + * itself or changing its structure. > + * > + * If delete_function is passed, it gets called on each entry present. > + */ > +void _mesa_hash_table_clear(struct hash_table *ht,
Mesa style is return-type on its own line. _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
