From 7186cb8a4161764b8b51a4917cb9040a53f42142 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 16 Sep 2020 13:27:01 -0400 Subject: ArrayNew, Free, Length, Nth and Append. Labeling and updates to heaaders --- src/hashtable.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/hashtable.c') diff --git a/src/hashtable.c b/src/hashtable.c index ed880c8..b717ffe 100644 --- a/src/hashtable.c +++ b/src/hashtable.c @@ -1,15 +1,16 @@ #include "types.h" +#include "nonport.h" #include "hashtable.h" -HashTable *TableNew(s32 p1, s32 p2, HashFunction hf, s32 p4, s32 p5) +HashTable *TableNew(u32 p1, s32 p2, HashFunction hf, s32 p4, s32 p5) { return TableNew2(p1, p2, 4, hf, p4, p5); } -HashTable *TableNew2(s32 p1, s32 size, s32 p3, HashFunction hf, s32 p5, s32 p6) +HashTable *TableNew2(u32 p1, s32 size, s32 p3, HashFunction hf, s32 p5, s32 p6) { - HashTable *table = (HashTable *)gsimalloc(sizeof(HashTable)); - table->chains = (DArray **)gsimalloc(size * sizeof(DArray *)); + HashTable *table = gsimalloc(sizeof(HashTable)); + table->chains = gsimalloc(size * sizeof(DArray *)); for (s32 i = 0; i < size; i++) { table->chains[i] = (DArray *)ArrayNew(p1, p3, p6); } -- cgit v1.2.3