diff options
author | Max <mparisi@stevens.edu> | 2020-09-16 13:27:01 -0400 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-09-16 13:27:01 -0400 |
commit | 7186cb8a4161764b8b51a4917cb9040a53f42142 (patch) | |
tree | 9e651e8d9791f5000a48f002568facf73bcf8cd8 /src/hashtable.c | |
parent | 319dd22af1f7b3d8ba47cdd67dd18a3bd8e01ed2 (diff) |
ArrayNew, Free, Length, Nth and Append. Labeling and updates to heaaders
Diffstat (limited to 'src/hashtable.c')
-rw-r--r-- | src/hashtable.c | 9 |
1 files changed, 5 insertions, 4 deletions
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);
}
|