summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/hashmap.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-18 19:43:46 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-18 19:43:46 +0000
commitdfa17b9f36f5741be05e144c15a8e89fceae9415 (patch)
tree5d0166c424e14ce0c81fc9725523bd40ecafdc98 /src/pulsecore/hashmap.h
parent8be0cf60079da8f75933fa128f91efefbd73d5c5 (diff)
cleanup hashmap.[ch] a little: use hash/compare func prototypes defined in idxset.h, add pa_hashmpa_{get,steal}_first
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1263 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/hashmap.h')
-rw-r--r--src/pulsecore/hashmap.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pulsecore/hashmap.h b/src/pulsecore/hashmap.h
index 3f62adb1..b8a358ec 100644
--- a/src/pulsecore/hashmap.h
+++ b/src/pulsecore/hashmap.h
@@ -22,6 +22,8 @@
USA.
***/
+#include <pulsecore/idxset.h>
+
/* Simple Implementation of a hash table. Memory management is the
* user's job. It's a good idea to have the key pointer point to a
* string in the value data. */
@@ -29,7 +31,7 @@
typedef struct pa_hashmap pa_hashmap;
/* Create a new hashmap. Use the specified functions for hashing and comparing objects in the map */
-pa_hashmap *pa_hashmap_new(unsigned (*hash_func) (const void *p), int (*compare_func) (const void*a, const void*b));
+pa_hashmap *pa_hashmap_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func);
/* Free the hash table. Calls the specified function for every value in the table. The function may be NULL */
void pa_hashmap_free(pa_hashmap*, void (*free_func)(void *p, void *userdata), void *userdata);
@@ -50,4 +52,8 @@ unsigned pa_hashmap_size(pa_hashmap *h);
is returned. */
void *pa_hashmap_iterate(pa_hashmap *h, void **state, const void**key);
+void *pa_hashmap_steal_first(pa_hashmap *h);
+
+void *pa_hashmap_get_first(pa_hashmap *h);
+
#endif