1 #ifndef HEADER_CURL_HASH_H 2 #define HEADER_CURL_HASH_H 25 #include "curl_setup.h" 32 typedef size_t (*hash_function) (
void* key,
39 typedef size_t (*comp_function) (
void* key1,
44 typedef void (*curl_hash_dtor)(
void *);
50 hash_function hash_func;
53 comp_function comp_func;
74 comp_function comparator,
77 void *Curl_hash_add(
struct curl_hash *h,
void *key,
size_t key_len,
void *p);
78 int Curl_hash_delete(
struct curl_hash *h,
void *key,
size_t key_len);
79 void *Curl_hash_pick(
struct curl_hash *,
void * key,
size_t key_len);
80 void Curl_hash_apply(
struct curl_hash *h,
void *user,
81 void (*cb)(
void *user,
void *ptr));
83 void Curl_hash_destroy(
struct curl_hash *h);
84 void Curl_hash_clean(
struct curl_hash *h);
85 void Curl_hash_clean_with_criterium(
struct curl_hash *h,
void *user,
86 int (*comp)(
void *,
void *));
87 size_t Curl_hash_str(
void* key,
size_t key_length,
size_t slots_num);
88 size_t Curl_str_key_compare(
void*k1,
size_t key1_len,
void*k2,
91 void Curl_hash_start_iterate(
struct curl_hash *hash,
97 void (*func)(
void *));