]> git.datanom.net - hashtable.git/blobdiff - hashtable.h
print function
[hashtable.git] / hashtable.h
index 23c8838fcea51aa5c5123d4acf8cf7c159288c63..edd91f4dffe42ec02a6844ed6a43fd5951802424 100644 (file)
@@ -10,6 +10,7 @@
 typedef uint64_t (*HashFunc)(const void*);
 typedef bool (*EqualFunc)(const void*, const void*);
 typedef void (*FreeFunc)(void*);
+typedef void (*PrintFunc)(void*);
 typedef struct _Hashtable Hashtable;
 typedef void (*ForeachFunc)(void*, void*, void*);
 
@@ -37,7 +38,7 @@ bool ptr_equal(const void*, const void*);
 
 Hashtable* hash_table_create(HashFunc hf, EqualFunc ef);
 Hashtable* hash_table_create_notify(HashFunc hf, EqualFunc ef, FreeFunc ff);
-Hashtable* hash_table_create_full(HashFunc hf, EqualFunc ef, uint32_t size, FreeFunc ff);
+Hashtable* hash_table_create_full(HashFunc hf, EqualFunc ef, uint32_t size, FreeFunc ff, PrintFunc pf);
 void hash_table_destroy(Hashtable* ht);
 void hash_table_print(Hashtable* ht);
 bool hash_table_insert(Hashtable* ht, const void* key, void* obj);
@@ -49,6 +50,10 @@ void hash_table_list_free(List* list);
 void hash_table_foreach(Hashtable* ht, ForeachFunc, void* userdata);
 void hash_table_iter_init(HashtableIter* iter, Hashtable* ht);
 bool hash_table_iter_next(HashtableIter* iter, void** key, void** value);
+bool hash_table_contains(Hashtable* ht, const void* key);
+uint64_t hash_table_size(Hashtable* ht);
+bool hash_table_replace(Hashtable* ht, void* key, void* value);
+void hash_table_set_print_func(Hashtable* ht, PrintFunc pf);
 
 #endif
 
This page took 0.040273 seconds and 5 git commands to generate.