libyasm
hamt.h
Go to the documentation of this file.
1 
30 #ifndef YASM_HAMT_H
31 #define YASM_HAMT_H
32 
33 #ifndef YASM_LIB_DECL
34 #define YASM_LIB_DECL
35 #endif
36 
38 typedef struct HAMT HAMT;
40 typedef struct HAMTEntry HAMTEntry;
41 
48 YASM_LIB_DECL
49 HAMT *HAMT_create(int nocase, /*@exits@*/ void (*error_func)
50  (const char *file, unsigned int line, const char *message));
51 
57 YASM_LIB_DECL
58 void HAMT_destroy(/*@only@*/ HAMT *hamt,
59  void (*deletefunc) (/*@only@*/ void *data));
60 
77 YASM_LIB_DECL
78 /*@dependent@*/ void *HAMT_insert(HAMT *hamt, /*@dependent@*/ const char *str,
79  /*@only@*/ void *data, int *replace,
80  void (*deletefunc) (/*@only@*/ void *data));
81 
87 YASM_LIB_DECL
88 /*@dependent@*/ /*@null@*/ void *HAMT_search(HAMT *hamt, const char *str);
89 
97 YASM_LIB_DECL
98 int HAMT_traverse(HAMT *hamt, /*@null@*/ void *d,
99  int (*func) (/*@dependent@*/ /*@null@*/ void *node,
100  /*@null@*/ void *d));
101 
106 YASM_LIB_DECL
107 const HAMTEntry *HAMT_first(const HAMT *hamt);
108 
113 YASM_LIB_DECL
114 /*@null@*/ const HAMTEntry *HAMT_next(const HAMTEntry *prev);
115 
120 YASM_LIB_DECL
121 void *HAMTEntry_get_data(const HAMTEntry *entry);
122 
123 #endif