62 UcxMap *ucx_map_clone(UcxMap *map, copy_func fnc, void *data); |
62 UcxMap *ucx_map_clone(UcxMap *map, copy_func fnc, void *data); |
63 int ucx_map_rehash(UcxMap *map); |
63 int ucx_map_rehash(UcxMap *map); |
64 |
64 |
65 int ucx_map_put(UcxMap *map, UcxKey key, void *data); |
65 int ucx_map_put(UcxMap *map, UcxKey key, void *data); |
66 void* ucx_map_get(UcxMap *map, UcxKey key); |
66 void* ucx_map_get(UcxMap *map, UcxKey key); |
|
67 void* ucx_map_remove(UcxMap *map, UcxKey key); |
67 |
68 |
68 #define ucx_map_sstr_put(m, s, d) ucx_map_put(m, ucx_key(s.ptr, s.length), d) |
69 #define ucx_map_sstr_put(m, s, d) ucx_map_put(m, ucx_key(s.ptr, s.length), d) |
69 #define ucx_map_cstr_put(m, s, d) ucx_map_put(m, ucx_key(s, 1+strlen(s)), d) |
70 #define ucx_map_cstr_put(m, s, d) ucx_map_put(m, ucx_key(s, 1+strlen(s)), d) |
70 #define ucx_map_sstr_get(m, s) ucx_map_get(m, ucx_key(s.ptr, s.length)) |
71 #define ucx_map_sstr_get(m, s) ucx_map_get(m, ucx_key(s.ptr, s.length)) |
71 #define ucx_map_cstr_get(m, s) ucx_map_get(m, ucx_key(s, 1+strlen(s))) |
72 #define ucx_map_cstr_get(m, s) ucx_map_get(m, ucx_key(s, 1+strlen(s))) |
|
73 #define ucx_map_sstr_remove(m, s) ucx_map_remove(m, ucx_key(s.ptr, s.length)) |
|
74 #define ucx_map_cstr_remove(m, s) ucx_map_remove(m, ucx_key(s, 1+strlen(s))) |
72 |
75 |
73 UcxKey ucx_key(void *data, size_t len); |
76 UcxKey ucx_key(void *data, size_t len); |
74 |
77 |
75 int ucx_hash(char *data, size_t len); |
78 int ucx_hash(char *data, size_t len); |
76 |
79 |