1 ============================
2 Creating a hashkit structure
3 ============================
10 C Library for hashing algorithms (libmemcached, -lhashkit)
13 #include <libhashkit/hashkit.h>
15 .. c:function:: hashkit_st *hashkit_create(hashkit_st *hash);
17 .. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
19 .. c:function:: void hashkit_free(hashkit_st *hash);
21 .. c:function:: bool hashkit_is_allocated(const hashkit_st *hash);
23 Compile and link with -lmemcached
31 The hashkit_create() function initializes a hashkit object for use. If
32 you pass a NULL argument for hash, then the memory for the object is
33 allocated. If you specify a pre-allocated piece of memory, that is
36 The hashkit_clone() function initializes a hashkit object much like
37 hashkit_create(), but instead of using default settings it will use
38 the settings of the ptr hashkit object.
40 The hashkit_free() frees any resources being consumed by the hashkit
41 objects that were initialized with hashkit_create() or hashkit_clone().
43 The hashkit_is_allocated() reports where the memory was allocated
52 hashkit_create() and hashkit_clone() will return NULL on failure or
55 hashkit_is_allocated() returns true if the memory for the hashkit
56 object was allocated inside of hashkit_create() or hashkit_clone(),
57 otherwise it is false and was user-supplied memory.
65 To find out more information please check:
66 `http://libmemcached.org/ <http://libmemcached.org/>`_