Merge remote branch 'origin/master' into lp-binning
[mesa.git] / src / gallium / auxiliary / util / u_hash_table.h
index feee881582e1b891d456fcdc0be82d5bf917dbb0..51ec10a8041938bef807fb43527568e149c26b81 100644 (file)
@@ -35,7 +35,7 @@
 #define U_HASH_TABLE_H_
 
 
-#include "pipe/p_error.h"
+#include "pipe/p_defines.h"
 
 
 #ifdef __cplusplus
@@ -46,7 +46,7 @@ extern "C" {
 /**
  * Generic purpose hash table.
  */
-struct hash_table;
+struct util_hash_table;
 
 
 /**
@@ -55,37 +55,38 @@ struct hash_table;
  * @param hash hash function
  * @param compare should return 0 for two equal keys.
  */
-struct hash_table *
-hash_table_create(unsigned (*hash)(void *key),
-                  int (*compare)(void *key1, void *key2));
+struct util_hash_table *
+util_hash_table_create(unsigned (*hash)(void *key),
+                       int (*compare)(void *key1, void *key2));
 
 
 enum pipe_error
-hash_table_set(struct hash_table *ht,
-               void *key,
-               void *value);
+util_hash_table_set(struct util_hash_table *ht,
+                    void *key,
+                    void *value);
 
 void *
-hash_table_get(struct hash_table *ht, 
-               void *key);
+util_hash_table_get(struct util_hash_table *ht,
+                    void *key);
 
 
 void
-hash_table_remove(struct hash_table *ht, 
-                  void *key);
+util_hash_table_remove(struct util_hash_table *ht,
+                       void *key);
 
 
 void
-hash_table_clear(struct hash_table *ht);
+util_hash_table_clear(struct util_hash_table *ht);
 
 
 enum pipe_error
-hash_table_foreach(struct hash_table *ht,
-                   enum pipe_error (*callback)(void *key, void *value, void *data),
-                   void *data);
+util_hash_table_foreach(struct util_hash_table *ht,
+                        enum pipe_error (*callback)
+                        (void *key, void *value, void *data),
+                        void *data);
 
 void
-hash_table_destroy(struct hash_table *ht);
+util_hash_table_destroy(struct util_hash_table *ht);
 
 
 #ifdef __cplusplus