[Mesa-dev] [PATCH 01/10] util/hash_table: add _mesa_hash_table_clear

Matt Turner mattst88 at gmail.com
Mon Jan 11 22:04:52 PST 2016


On Mon, Jan 11, 2016 at 6:32 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>  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.


More information about the mesa-dev mailing list