1 ============================
2 Creating a hashkit structure
3 ============================
6 Create and destroy hashkit objects
14 C Library for hashing algorithms (libmemcached, -lhashkit)
25 #include <libmemcached/hashkit.h>
27 hashkit_st *hashkit_create(hashkit_st *hash);
29 hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
31 void hashkit_free(hashkit_st *hash);
33 bool hashkit_is_allocated(const hashkit_st *hash);
42 The hashkit_create() function initializes a hashkit object for use. If
43 you pass a NULL argument for hash, then the memory for the object is
44 allocated. If you specify a pre-allocated piece of memory, that is
47 The hashkit_clone() function initializes a hashkit object much like
48 hashkit_create(), but instead of using default settings it will use
49 the settings of the ptr hashkit object.
51 The hashkit_free() frees any resources being consumed by the hashkit
52 objects that were initialized with hashkit_create() or hashkit_clone().
54 The hashkit_is_allocated() reports where the memory was allocated
63 hashkit_create() and hashkit_clone() will return NULL on failure or
66 hashkit_is_allocated() returns true if the memory for the hashkit
67 object was allocated inside of hashkit_create() or hashkit_clone(),
68 otherwise it is false and was user-supplied memory.
76 To find out more information please check:
77 `https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_