int (*eq)(const void *entry, const void *val),
const void *val, int reserve);
int isl_hash_table_foreach(struct isl_ctx *ctx,
- struct isl_hash_table *table,
- int (*fn)(void *entry, void *user), void *user);
+ struct isl_hash_table *table,
+ int (*fn)(void **entry, void *user), void *user);
void isl_hash_table_remove(struct isl_ctx *ctx,
struct isl_hash_table *table,
struct isl_hash_table_entry *entry);
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;
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;
return 0;
}
-static int free_keyword(void *p, void *user)
+static int free_keyword(void **p, void *user)
{
- struct isl_keyword *keyword = p;
+ struct isl_keyword *keyword = *p;
free(keyword->name);
free(keyword);