2 * Summary: String structure used for libmemcached.
4 * Copy: See Copyright for the status of this software.
9 #ifndef __MEMCACHED_STRING_H__
10 #define __MEMCACHED_STRING_H__
16 struct memcached_string_st
{
25 #define memcached_string_length(A) (size_t)((A)->end - (A)->string)
26 #define memcached_string_set_length(A, B) (A)->end= (A)->string + B
27 #define memcached_string_size(A) (A)->current_size
28 #define memcached_string_value(A) (A)->string
30 memcached_string_st
*memcached_string_create(memcached_st
*ptr
,
31 memcached_string_st
*string
,
33 memcached_return
memcached_string_check(memcached_string_st
*string
, size_t need
);
34 char *memcached_string_c_copy(memcached_string_st
*string
);
35 memcached_return
memcached_string_append_character(memcached_string_st
*string
,
37 memcached_return
memcached_string_append(memcached_string_st
*string
,
38 char *value
, size_t length
);
39 memcached_return
memcached_string_reset(memcached_string_st
*string
);
40 void memcached_string_free(memcached_string_st
*string
);
46 #endif /* __MEMCACHED_STRING_H__ */