4 #include "carma/szaarrayutils/freelist.h"
5 #include "carma/szaarrayutils/stringmem.h"
18 #define SYM_DEL_FN(fn) void *(fn)(void *app_data, int code, void *sym_data)
30 #define HASH_DEL_FN(fn) void *(fn)(void *app_data)
77 FreeList *hash_memory;
78 FreeList *node_memory;
79 StringMem *string_memory;
84 HashMemory *new_HashMemory(
int hash_count,
int node_count);
88 HashMemory *del_HashMemory(HashMemory *mem,
int force);
94 void show_HashMemory(HashMemory *mem);
100 typedef struct HashNode HashNode;
126 int (*keycmp)(
const char *,
const char *);
128 HASH_DEL_FN(*del_fn);
141 HashTable *new_HashTable(HashMemory *mem,
int size, HashCase hcase,
142 void *app_data, HASH_DEL_FN(*del_fn));
146 HashTable *ref_HashTable(HashTable *hash);
150 HashTable *del_HashTable(HashTable *hash);
154 Symbol *new_HashSymbol(HashTable *hash,
char *key,
int code,
void (*fn)(
void),
155 void *data, SYM_DEL_FN(*del_fn));
159 int clear_HashTable(HashTable *hash);
163 Symbol *del_HashSymbol(HashTable *hash,
char *key);
167 Symbol *find_HashSymbol(HashTable *hash,
char *key);
171 void show_HashTable(HashTable *hash,
int summarize);
176 #define HASH_SCAN_FN(fn) int (fn)(Symbol *sym, void *context)
178 int scan_HashTable(HashTable *hash, HASH_SCAN_FN(*scan_fn),
void *context);