commit 3f25a95aaaf84e6d5340c0b983a74fddf3bec12a
parent fa2070af209e9ed255f2d321a6e2d46f47a25fad
Author: Drew DeVault <sir@cmpwn.com>
Date: Thu, 14 Jan 2021 09:52:28 -0500
type store: use uint64_t for hashes
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/type_store.c b/src/type_store.c
@@ -288,7 +288,7 @@ builtin_type_for_storage(enum type_storage storage, bool is_const)
assert(0); // Unreachable
}
-static unsigned long
+static uint64_t
type_hash(struct type_store *store, const struct type *type)
{
uint64_t hash = FNV1A_INIT;
@@ -750,7 +750,7 @@ type_store_lookup_type(struct type_store *store, const struct type *type)
return builtin;
}
- unsigned long hash = type_hash(store, type);
+ uint64_t hash = type_hash(store, type);
struct type_bucket **next = &store->buckets[hash % TYPE_STORE_BUCKETS],
*bucket = NULL;