Merge in docs.
[m6w6/libmemcached] / docs / hashkit_create.rst
1 .. highlight:: perl
2
3
4 hashkit_create, hashkit_clone, hashkit_free, hashkit_is_allocated
5 *****************************************************************
6
7
8 Create and destroy hashkit objects
9
10
11 *******
12 LIBRARY
13 *******
14
15
16 C Library for hashing algorithms (libhashkit, -lhashkit)
17
18
19 ********
20 SYNOPSIS
21 ********
22
23
24
25 .. code-block:: perl
26
27 #include <libhashkit/hashkit.h>
28
29 hashkit_st *hashkit_create(hashkit_st *hash);
30
31 hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
32
33 void hashkit_free(hashkit_st *hash);
34
35 bool hashkit_is_allocated(const hashkit_st *hash);
36
37
38
39 ***********
40 DESCRIPTION
41 ***********
42
43
44 The hashkit_create() function initializes a hashkit object for use. If
45 you pass a NULL argument for hash, then the memory for the object is
46 allocated. If you specify a pre-allocated piece of memory, that is
47 initialized for use.
48
49 The hashkit_clone() function initializes a hashkit object much like
50 hashkit_create(), but instead of using default settings it will use
51 the settings of the ptr hashkit object.
52
53 The hashkit_free() frees any resources being consumed by the hashkit
54 objects that were initialized with hashkit_create() or hashkit_clone().
55
56 The hashkit_is_allocated() reports where the memory was allocated
57 for a hashkit object.
58
59
60 ************
61 RETURN VALUE
62 ************
63
64
65 hashkit_create() and hashkit_clone() will return NULL on failure or
66 non-NULL on success.
67
68 hashkit_is_allocated() returns true if the memory for the hashkit
69 object was allocated inside of hashkit_create() or hashkit_clone(),
70 otherwise it is false and was user-supplied memory.
71
72
73 ****
74 HOME
75 ****
76
77
78 To find out more information please check:
79 `https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
80
81
82 ******
83 AUTHOR
84 ******
85
86
87 Brian Aker, <brian@tangent.org>
88