24#ifndef __M_HASHTABLE_H__
25#define __M_HASHTABLE_H__
29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
31#include <mstdlib/base/m_mem.h>
32#include <mstdlib/base/m_math.h>
33#include <mstdlib/base/m_sort.h>
34#include <mstdlib/base/m_llist.h>
118#define M_HASHTABLE_MAX_BUCKETS (1U<<24)
150typedef void *(*M_hashtable_duplicate_func)(
const void *);
union M_hashtable_enum::@0 entry
size_t valueidx
Definition: m_hashtable.h:142
M_hashtable_duplicate_func key_duplicate_copy
Definition: m_hashtable.h:182
M_hashtable_duplicate_func value_duplicate_copy
Definition: m_hashtable.h:188
M_hashtable_duplicate_func key_duplicate_insert
Definition: m_hashtable.h:180
M_hashtable_duplicate_func value_duplicate_insert
Definition: m_hashtable.h:186
M_hashtable_free_func value_free
Definition: m_hashtable.h:193
M_sort_compar_t value_equality
Definition: m_hashtable.h:190
M_hashtable_free_func key_free
Definition: m_hashtable.h:184
M_hashtable_t * M_hashtable_duplicate(const M_hashtable_t *h)
size_t M_hashtable_num_collisions(const M_hashtable_t *h)
struct M_hashtable M_hashtable_t
Definition: m_hashtable.h:123
M_bool M_hashtable_multi_get(const M_hashtable_t *h, const void *key, size_t idx, void **value)
void(* M_hashtable_free_func)(void *)
Definition: m_hashtable.h:153
size_t M_hashtable_num_keys(const M_hashtable_t *h)
M_bool M_hashtable_multi_len(const M_hashtable_t *h, const void *key, size_t *len)
void *(* M_hashtable_duplicate_func)(const void *)
Definition: m_hashtable.h:150
M_bool M_hashtable_enumerate_next(const M_hashtable_t *h, M_hashtable_enum_t *hashenum, const void **key, const void **value)
M_bool M_hashtable_multi_remove(M_hashtable_t *h, const void *key, size_t idx, M_bool destroy_vals)
M_bool M_hashtable_remove(M_hashtable_t *h, const void *key, M_bool destroy_vals)
M_uint32(* M_hashtable_hash_func)(const void *, M_uint32)
Definition: m_hashtable.h:147
size_t M_hashtable_num_expansions(const M_hashtable_t *h)
M_hashtable_t * M_hashtable_create(size_t size, M_uint8 fillpct, M_hashtable_hash_func key_hash, M_sort_compar_t key_equality, M_uint32 flags, const struct M_hashtable_callbacks *callbacks) M_MALLOC
M_uint32 M_hashtable_size(const M_hashtable_t *h)
M_bool M_hashtable_insert(M_hashtable_t *h, const void *key, const void *value)
M_hashtable_flags_t
Definition: m_hashtable.h:198
void M_hashtable_merge(M_hashtable_t **dest, M_hashtable_t *src)
M_bool M_hashtable_is_multi(const M_hashtable_t *h)
void M_hashtable_destroy(M_hashtable_t *h, M_bool destroy_vals) M_FREE(1)
M_bool M_hashtable_get(const M_hashtable_t *h, const void *key, void **value)
size_t M_hashtable_enumerate(const M_hashtable_t *h, M_hashtable_enum_t *hashenum)
@ M_HASHTABLE_KEYS_SORTED
Definition: m_hashtable.h:202
@ M_HASHTABLE_MULTI_VALUE
Definition: m_hashtable.h:203
@ M_HASHTABLE_NONE
Definition: m_hashtable.h:199
@ M_HASHTABLE_MULTI_GETLAST
Definition: m_hashtable.h:206
@ M_HASHTABLE_MULTI_SORTED
Definition: m_hashtable.h:205
@ M_HASHTABLE_KEYS_ORDERED
Definition: m_hashtable.h:200
@ M_HASHTABLE_STATIC_SEED
Definition: m_hashtable.h:208
Definition: m_hashtable.h:179
Definition: m_hashtable.h:128
struct M_llist_node M_llist_node_t
Definition: m_llist.h:78
int(* M_sort_compar_t)(const void *arg1, const void *arg2, void *thunk)
Definition: m_sort.h:78