diff options
Diffstat (limited to 'include/hashtable.h')
-rw-r--r-- | include/hashtable.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/hashtable.h b/include/hashtable.h index 0502273..784ab35 100644 --- a/include/hashtable.h +++ b/include/hashtable.h @@ -9,24 +9,23 @@ extern "C" { typedef s32 (*HashFunction)(void *, s32);
-
typedef struct HashTable {
DArray **chains;
s32 size;
- s32 unk8;
+ DtorFunction dtor;
HashFunction hashFunc;
- s32 unk10; // comparison callback?
+ CompareFunction compar;
} HashTable;
-HashTable *TableNew(s32 p1, s32 p2, HashFunction hf, s32 p4, s32 p5);
-HashTable *TableNew2(s32 p1, s32 size, s32 p3, HashFunction hf, s32 p5, s32 p6);
+HashTable *TableNew(u32 p1, s32 p2, HashFunction hf, CompareFunction cmp, DtorFunction dtor);
+HashTable *TableNew2(u32 p1, s32 size, s32 p3, HashFunction hf, CompareFunction cmp, DtorFunction dtor);
void TableFree(HashTable *table);
s32 TableCount(HashTable *table);
void TableEnter(HashTable *table, void *elem);
BOOL TableRemove(HashTable *table, void *elem);
void *TableLookup(HashTable *table, void *elem);
-void TableMapSafe(HashTable *table, s32 p2, s32 p3);
-void *TableMapSafe2(HashTable *table, s32 p2, s32 p3);
+void TableMapSafe(HashTable *table, MapFunction p2, s32 p3);
+void *TableMapSafe2(HashTable *table, MapFunction p2, s32 p3);
#ifdef __cplusplus
}
|