mesa: Drop unused hash_table::mem_ctx field.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Feb 2014 21:40:12 +0000 (13:40 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 7 Mar 2014 04:55:34 +0000 (20:55 -0800)
It's never used, and it's equivalent to ralloc_parent(ht) if you really
need it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/hash_table.c
src/mesa/main/hash_table.h
src/mesa/main/set.c

index 008b4cdbcc0a4fa2a23281ce7edfe7672ce7dad2..ad8f898529113d5ba9780e07fe6e6be3beeb60c3 100644 (file)
@@ -119,7 +119,6 @@ _mesa_hash_table_create(void *mem_ctx,
    if (ht == NULL)
       return NULL;
 
-   ht->mem_ctx = mem_ctx;
    ht->size_index = 0;
    ht->size = hash_sizes[ht->size_index].size;
    ht->rehash = hash_sizes[ht->size_index].rehash;
index ad1dae478ed57b6120230dd513bc777adedc8a1c..f51131aeed82a4a347bf483cd65e8063005bb278 100644 (file)
@@ -44,7 +44,6 @@ struct hash_entry {
 };
 
 struct hash_table {
-   void *mem_ctx;
    struct hash_entry *table;
    bool (*key_equals_function)(const void *a, const void *b);
    const void *deleted_key;
index dc3550c767c2a2fe29ef5e94dca68e3a09ec1dbb..989e5dece864b9163b258c88e6fd6d933fd86e74 100644 (file)
@@ -112,7 +112,6 @@ _mesa_set_create(void *mem_ctx,
    if (ht == NULL)
       return NULL;
 
-   ht->mem_ctx = mem_ctx;
    ht->size_index = 0;
    ht->size = hash_sizes[ht->size_index].size;
    ht->rehash = hash_sizes[ht->size_index].rehash;