45typedef int (*TableHashFn)(
const void *elem,
int numBuckets);
59typedef int (*TableCompareFn)(
const void *elem1,
const void *elem2);
66typedef void (*TableMapFn)(
void *elem,
void *clientData);
73typedef int (*TableMapFn2)(
void *elem,
void *clientData);
83typedef void (*TableElementFreeFn)(
void *elem);
121HashTable TableNew(
int elemSize,
int nBuckets,
122 TableHashFn hashFn, TableCompareFn compFn,
123 TableElementFreeFn freeFn);
125HashTable TableNew2(
int elemSize,
int nBuckets,
int nChains,
126 TableHashFn hashFn, TableCompareFn compFn,
127 TableElementFreeFn freeFn);
141void TableFree(HashTable table);
148int TableCount(HashTable table);
161void TableEnter(HashTable table,
const void *newElem);
169int TableRemove(HashTable table,
const void *delElem);
179void *TableLookup(HashTable table,
const void *elemKey);
192void TableMap(HashTable table, TableMapFn fn,
void *clientData);
198void TableMapSafe(HashTable table, TableMapFn fn,
void *clientData);
207void * TableMap2(HashTable table, TableMapFn2 fn,
void *clientData);
213void * TableMapSafe2(HashTable table, TableMapFn2 fn,
void *clientData);
219void TableClear(HashTable table);
Definition hashtable.c:39