diff options
Diffstat (limited to 'src/utils/hashtable.c')
-rw-r--r-- | src/utils/hashtable.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/hashtable.c b/src/utils/hashtable.c index c2ff8ce..f1dc076 100644 --- a/src/utils/hashtable.c +++ b/src/utils/hashtable.c @@ -16,6 +16,8 @@ #endif #include "utils/hashtable.h" +#include <libwapcaplet/libwapcaplet.h> + /* The hash table entry */ struct _dom_hash_entry { void *key; /**< The key pointer */ @@ -353,6 +355,15 @@ dom_hash_func _dom_hash_get_func(struct dom_hash_table *ht) return ht->hash; } +/*-----------------------------------------------------------------------*/ +/* The hash function for lwc_string type */ +unsigned int _dom_hash_hash_lwcstring(void *key) +{ + lwc_string *lstr = (lwc_string *) key; + + return lwc_string_hash_value(lstr); +} + /* A simple test rig. To compile, use: * gcc -g -o hashtest -I../ -I../../include -DTEST_RIG hashtable.c * |