11 typedef struct _dc_hash dc_hash_t;
12 typedef struct _dc_hashelem dc_hashelem_t;
46 dc_hashelem_t *next, *prev;
71 #define DC_HASH_POINTER 2
72 #define DC_HASH_STRING 3
73 #define DC_HASH_BINARY 4
79 #define DC_HASH_COPY_KEY 1
85 void dc_hash_init (dc_hash_t*,
int keytype,
int copyKey);
86 void* dc_hash_insert (dc_hash_t*,
const void *pKey,
int nKey,
void *pData);
87 void* dc_hash_find (
const dc_hash_t*,
const void *pKey,
int nKey);
88 void dc_hash_clear (dc_hash_t*);
90 #define dc_hash_find_str(H, s) dc_hash_find((H), (s), strlen((s)))
91 #define dc_hash_insert_str(H, s, d) dc_hash_insert((H), (s), strlen((s)), (d))
106 #define dc_hash_first(H) ((H)->first)
107 #define dc_hash_next(E) ((E)->next)
108 #define dc_hash_data(E) ((E)->data)
109 #define dc_hash_key(E) ((E)->pKey)
110 #define dc_hash_keysize(E) ((E)->nKey)
116 #define dc_hash_cnt(H) ((H)->count)