/*
* Copyright 2008-2009 Katholieke Universiteit Leuven
*
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege, K.U.Leuven, Departement
* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
*/
#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)
{
static int grow_table(struct isl_ctx *ctx, struct isl_hash_table *table,
int (*eq)(const void *entry, const void *val))
{
+ int n;
size_t old_size, size;
struct isl_hash_table_entry *entries;
uint32_t h;
return -1;
}
+ n = table->n;
+ table->n = 0;
table->bits++;
for (h = 0; h < old_size; ++h) {
table->bits--;
free(table->entries);
table->entries = entries;
+ table->n = n;
return -1;
}