projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Add docs for tap, and update all other documentation.
[awesomized/libmemcached]
/
libmemcached
/
array.c
diff --git
a/libmemcached/array.c
b/libmemcached/array.c
index 657bcdad96840c3909fe5ccce3c93c41e8637250..2412369e2a4199d81815d5d04cad496b4602ddcd 100644
(file)
--- a/
libmemcached/array.c
+++ b/
libmemcached/array.c
@@
-62,11
+62,20
@@
memcached_array_st *memcached_strcpy(memcached_st *memc, const char *str, size_t
array->root= memc;
array->size= str_length -1; // We don't count the NULL ending
memcpy(array->c_str, str, str_length);
array->root= memc;
array->size= str_length -1; // We don't count the NULL ending
memcpy(array->c_str, str, str_length);
- array->c_str[str_length
+1
]= 0;
+ array->c_str[str_length]= 0;
return array;
}
return array;
}
+memcached_string_t memcached_array_to_string(memcached_array_st *array)
+{
+ memcached_string_t tmp;
+ tmp.c_str= array->c_str;
+ tmp.size= array->size;
+
+ return tmp;
+}
+
void memcached_array_free(memcached_array_st *array)
{
if (! array)
void memcached_array_free(memcached_array_st *array)
{
if (! array)