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