|
libclod
C library for interacting with NBTs, region files, LOD data and other things.
|
#include <table.h>
Public Attributes | |
| size_t | min_capacity |
| uint64_t(* | hash_func )(uint64_t seed, const void *key, size_t key_size, void *user) |
| int(* | cmp_func )(const void *key1, size_t key1_size, const void *key2, size_t key2_size, void *user) |
| void *(* | malloc_func )(size_t, void *user) |
| void(* | free_func )(void *, void *user) |
| void * | user |
Configuration options passed to clod_table_create. Zero values imply defaults.
| size_t clod_table_opts::min_capacity |
| uint64_t(* clod_table_opts::hash_func) (uint64_t seed, const void *key, size_t key_size, void *user) |
| int(* clod_table_opts::cmp_func) (const void *key1, size_t key1_size, const void *key2, size_t key2_size, void *user) |
Custom equality function. Defaults to memcmp. The required behaviour for the hash_func and cmp_func relationship is; assert(cmp_func(a, b) != 0 || hash_func(a) == hash_func(b)); In other words, if cmp_func thinks two elements are equal, hash_func must agree.
| void *(* clod_table_opts::malloc_func) (size_t, void *user) |
| void(* clod_table_opts::free_func) (void *, void *user) |