blib/lib/Memcached/libmemcached/memcached_create.pm

filter: Statementstmt 100% 1 / 1 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 1 / 1 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Memcached/libmemcached/memcached_callback.pm ↑ Summary blib/lib/Memcached/libmemcached/memcached_delete.pm »
1 package Memcached::libmemcached::memcached_create;
2  
3 =head1 NAME
4  
5 memcached_create, memcached_free, memcached_clone, memcached_servers_reset- Create a memcached_st structure
6  
7 =head1 LIBRARY
8  
9 C Client Library for memcached (libmemcached, -lmemcached)
10  
11 =head1 SYNOPSIS
12  
13 #include <memcached.h>
14  
15 memcached_st *memcached_create (memcached_st *ptr);
16  
17 void memcached_free (memcached_st *ptr);
18  
19 memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
20  
21 void memcached_servers_reset(memcached_st);
22  
23 =head1 DESCRIPTION
24  
25 memcached_create() is used to create a C<memcached_st> structure that will then
26 be used by other libmemcached(3) functions to communicate with the server. You
27 should either pass a statically declared C<memcached_st> to memcached_create() or
28 a NULL. If a NULL passed in then a structure is allocated for you.
29  
30 memcached_clone() is similar to memcached_create(3) but it copies the
31 defaults and list of servers from the source C<memcached_st>. If you pass a null as
32 the argument for the source to clone, it is the same as a call to memcached_create().
33 If the destination argument is NULL a C<memcached_st> will be allocated for you.
34  
35 memcached_servers_reset() allows you to zero out the list of servers that
36 the memcached_st has.
37  
38 To clean up memory associated with a C<memcached_st> structure you should pass
39 it to memcached_free() when you are finished using it. memcached_free() is
40 the only way to make sure all memory is deallocated when you finish using
41 the structure.
42  
43 You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
44 stack based allocation. The most common issues related to ABI safety involve
45 heap allocated structures.
46  
47 =head1 RETURN
48  
49 memcached_create() returns a pointer to the memcached_st that was created
50 (or initialized). On an allocation failure, it returns NULL.
51  
52 memcached_clone() returns a pointer to the memcached_st that was created
53 (or initialized). On an allocation failure, it returns NULL.
54  
55 =head1 HOME
56  
57 To find out more information please check:
58 L<https://launchpad.net/libmemcached>
59  
60 =head1 AUTHOR
61  
62 Brian Aker, E<lt>brian@tangent.orgE<gt>
63  
64 =head1 SEE ALSO
65  
66 memcached(1) libmemcached(3) memcached_strerror(3)
67  
68 =cut
69  
70 1 1;
« blib/lib/Memcached/libmemcached/memcached_callback.pm ↑ Summary blib/lib/Memcached/libmemcached/memcached_delete.pm »