From 2cff2518631fc538c127c1e94c47c743e2a64661 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Nov 2002 10:51:41 +0000 Subject: Curl_resolv() now returns a different struct, and it contains a reference counter so that the caller needs to decrease that counter when done with the returned data. If compiled with MALLOCDEBUG I've added some extra checking that the counter is decreased before a handle is closed etc. --- lib/hash.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/hash.h') diff --git a/lib/hash.h b/lib/hash.h index 523e0ed6f..c3464c355 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -41,7 +41,7 @@ typedef struct _curl_hash { typedef struct _curl_hash_element { void *ptr; char *key; - size_t key_len; + size_t key_len; } curl_hash_element; @@ -49,15 +49,14 @@ void Curl_hash_init(curl_hash *, int, curl_hash_dtor); curl_hash *Curl_hash_alloc(int, curl_hash_dtor); int Curl_hash_add(curl_hash *, char *, size_t, const void *); int Curl_hash_delete(curl_hash *h, char *key, size_t key_len); -int Curl_hash_find(curl_hash *, char *, size_t, void **p); -void Curl_hash_apply(curl_hash *h, void *user, void (*cb)(void *, curl_hash_element *)); +void *Curl_hash_pick(curl_hash *, char *, size_t); +void Curl_hash_apply(curl_hash *h, void *user, + void (*cb)(void *user, void *ptr)); int Curl_hash_count(curl_hash *h); void Curl_hash_clean(curl_hash *h); void Curl_hash_clean_with_criterium(curl_hash *h, void *user, int (*comp)(void *, void *)); void Curl_hash_destroy(curl_hash *h); -#define Curl_hash_update Curl_hash_add - #endif /* -- cgit v1.2.3