1 Creating a hashkit structure
2 ============================
7 #include <libhashkit-|libhashkit_version|/hashkit.h>
8 Compile and link with -lhashkit
10 .. type:: struct hashkit_st hashkit_st
12 .. function:: hashkit_st *hashkit_create(hashkit_st *hash)
14 .. function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr)
16 .. function:: void hashkit_free(hashkit_st *hash)
18 .. function:: bool hashkit_is_allocated(const hashkit_st *hash)
23 The `hashkit_create` function initializes a hashkit object for use. If you pass
24 a NULL argument for hash, then the memory for the object is allocated. If you
25 specify a pre-allocated piece of memory, that is initialized for use.
27 The `hashkit_clone` function initializes a hashkit object much like
28 `hashkit_create`, but instead of using default settings it will use the settings
29 of the ptr hashkit object.
31 The `hashkit_free` frees any resources being consumed by the hashkit objects
32 that were initialized with `hashkit_create` or `hashkit_clone`.
34 The `hashkit_is_allocated` reports where the memory was allocated for a hashkit
40 `hashkit_create` and `hashkit_clone` will return NULL on failure or non-NULL on
43 `hashkit_is_allocated` returns true if the memory for the hashkit object was
44 allocated inside of `hashkit_create` or `hashkit_clone`, otherwise it is false
45 and was user-supplied memory.
52 :manpage:`libhashkit(3)`
53 :manpage:`hashkit_value(3)`
54 :manpage:`hashkit_function3)`
58 * :doc:`../libhashkit`
59 * :doc:`hashkit_value`
60 * :doc:`hashkit_function`