isl_map_order_gt: add special case for ordering a dimension wrt itself
[platform/upstream/isl.git] / isl_hash.c
index 5abf9fd..c997402 100644 (file)
@@ -8,8 +8,9 @@
  */
 
 #include <stdlib.h>
-#include "isl_hash.h"
-#include "isl_ctx.h"
+#include <strings.h>
+#include <isl/hash.h>
+#include <isl/ctx.h>
 
 uint32_t isl_hash_string(uint32_t hash, const char *s)
 {
@@ -163,7 +164,7 @@ struct isl_hash_table_entry *isl_hash_table_find(struct isl_ctx *ctx,
 
 int isl_hash_table_foreach(struct isl_ctx *ctx,
                                struct isl_hash_table *table,
-                               int (*fn)(void *entry, void *user), void *user)
+                               int (*fn)(void **entry, void *user), void *user)
 {
        size_t size;
        uint32_t h;
@@ -171,7 +172,7 @@ int isl_hash_table_foreach(struct isl_ctx *ctx,
        size = 1 << table->bits;
        for (h = 0; h < size; ++ h)
                if (table->entries[h].data &&
-                   fn(table->entries[h].data, user) < 0)
+                   fn(&table->entries[h].data, user) < 0)
                        return -1;
        
        return 0;