diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-01-25 00:06:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-01-25 00:06:29 +0000 |
commit | 043d70fcdfa50c93dc826069aa5836206f8e3e2d (patch) | |
tree | af76e68933639c821d1e632ae54b34215ac73945 /lib/hash.h | |
parent | 4f7e95896934df81df2a7f49e0a4f6b775fcb308 (diff) | |
download | curl-043d70fcdfa50c93dc826069aa5836206f8e3e2d.tar.gz |
Use plain structs and not typedef'ed ones in the hash and linked-list code.
Diffstat (limited to 'lib/hash.h')
-rw-r--r-- | lib/hash.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/lib/hash.h b/lib/hash.h index 7814674fd..ceebb5234 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,30 +31,31 @@ typedef void (*curl_hash_dtor)(void *); -typedef struct _curl_hash { - curl_llist **table; +struct curl_hash { + struct curl_llist **table; curl_hash_dtor dtor; - int slots; - size_t size; -} curl_hash; + int slots; + size_t size; +}; -typedef struct _curl_hash_element { +struct curl_hash_element { void *ptr; char *key; size_t key_len; -} curl_hash_element; +}; -int Curl_hash_init(curl_hash *, int, curl_hash_dtor); -curl_hash *Curl_hash_alloc(int, curl_hash_dtor); -void *Curl_hash_add(curl_hash *, char *, size_t, void *); -int Curl_hash_delete(curl_hash *h, char *key, size_t key_len); -void *Curl_hash_pick(curl_hash *, char *, size_t); -void Curl_hash_apply(curl_hash *h, void *user, +int Curl_hash_init(struct curl_hash *, int, curl_hash_dtor); +struct curl_hash *Curl_hash_alloc(int, curl_hash_dtor); +void *Curl_hash_add(struct curl_hash *, char *, size_t, void *); +int Curl_hash_delete(struct curl_hash *h, char *key, size_t key_len); +void *Curl_hash_pick(struct curl_hash *, char *, size_t); +void Curl_hash_apply(struct 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); +int Curl_hash_count(struct curl_hash *h); +void Curl_hash_clean(struct curl_hash *h); +void Curl_hash_clean_with_criterium(struct curl_hash *h, void *user, + int (*comp)(void *, void *)); +void Curl_hash_destroy(struct curl_hash *h); #endif |