1 ============================
2 Creating a hashkit structure
3 ============================
5 .. index:: object: hashkit_st
11 #include <libhashkit/hashkit.h>
13 .. c:function:: hashkit_st *hashkit_create(hashkit_st *hash);
15 .. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
17 .. c:function:: void hashkit_free(hashkit_st *hash);
19 .. c:function:: bool hashkit_is_allocated(const hashkit_st *hash);
21 Compile and link with -lhashkit
27 .. c:function:: hashkit_st *hashkit_create(hashkit_st *hash);
29 .. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
31 .. c:function:: void hashkit_free(hashkit_st *hash);
33 .. c:function:: bool hashkit_is_allocated(const hashkit_st *hash);
40 The hashkit_create() function initializes a hashkit object for use. If
41 you pass a NULL argument for hash, then the memory for the object is
42 allocated. If you specify a pre-allocated piece of memory, that is
45 The hashkit_clone() function initializes a hashkit object much like
46 hashkit_create(), but instead of using default settings it will use
47 the settings of the ptr hashkit object.
49 The hashkit_free() frees any resources being consumed by the hashkit
50 objects that were initialized with hashkit_create() or hashkit_clone().
52 The hashkit_is_allocated() reports where the memory was allocated
61 hashkit_create() and hashkit_clone() will return NULL on failure or
64 hashkit_is_allocated() returns true if the memory for the hashkit
65 object was allocated inside of hashkit_create() or hashkit_clone(),
66 otherwise it is false and was user-supplied memory.
74 To find out more information please check:
75 `http://libmemcached.org/ <http://libmemcached.org/>`_