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
29 The hashkit_create() function initializes a hashkit object for use. If
30 you pass a NULL argument for hash, then the memory for the object is
31 allocated. If you specify a pre-allocated piece of memory, that is
34 The hashkit_clone() function initializes a hashkit object much like
35 hashkit_create(), but instead of using default settings it will use
36 the settings of the ptr hashkit object.
38 The hashkit_free() frees any resources being consumed by the hashkit
39 objects that were initialized with hashkit_create() or hashkit_clone().
41 The hashkit_is_allocated() reports where the memory was allocated
50 hashkit_create() and hashkit_clone() will return NULL on failure or
53 hashkit_is_allocated() returns true if the memory for the hashkit
54 object was allocated inside of hashkit_create() or hashkit_clone(),
55 otherwise it is false and was user-supplied memory.
63 To find out more information please check:
64 `http://libmemcached.org/ <http://libmemcached.org/>`_