From 4f0a5e7572a4257894b4bfede42c26d65152609e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 13 Aug 2005 21:25:09 +0000 Subject: * strip glib from avahi-core * implement glib memory allocator * add new documentation file MALLOC * initialize pseudo-RNG from /dev/urandom in avahi-daemon * remove some gcc 4.0 warnings * beef up watch system with real timeouts * move GCC __attribute__ macros into its own header avahi-common/gccmacro.h * make use of GCC's sentinel attribute where it make sense * add malloc() implementations that abort on OOM and enable them by default git-svn-id: file:///home/lennart/svn/public/avahi/trunk@308 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/hashmap.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'avahi-core/hashmap.h') diff --git a/avahi-core/hashmap.h b/avahi-core/hashmap.h index c3000ba..f546dfc 100644 --- a/avahi-core/hashmap.h +++ b/avahi-core/hashmap.h @@ -37,14 +37,19 @@ AvahiHashmap* avahi_hashmap_new(AvahiHashFunc hash_func, AvahiEqualFunc equal_fu void avahi_hashmap_free(AvahiHashmap *m); void* avahi_hashmap_lookup(AvahiHashmap *m, const void *key); void* avahi_hashmap_steal(AvahiHashmap *m, const void *key); -int avahi_hashmap_insert(AvahiHashmap *m, void *key, void *data); -int avahi_hashmap_replace(AvahiHashmap *m, void *key, void *data); +int avahi_hashmap_insert(AvahiHashmap *m, void *key, void *value); +int avahi_hashmap_replace(AvahiHashmap *m, void *key, void *value); void avahi_hashmap_remove(AvahiHashmap *m, const void *key); +typedef void (*AvahiHashmapForeachCallback)(void *key, void *value, void *userdata); + +void avahi_hashmap_foreach(AvahiHashmap *m, AvahiHashmapForeachCallback callback, void *userdata); + unsigned avahi_string_hash(const void *data); int avahi_string_equal(const void *a, const void *b); -unsigned avahi_domain_hash(const void *data); +unsigned avahi_int_hash(const void *data); +int avahi_int_equal(const void *a, const void *b); AVAHI_C_DECL_END -- cgit