new_value= libmemcached_realloc(string->root, string->string, new_size);
if (new_value == NULL)
+ {
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+ }
string->string= new_value;
string->end= string->string + current_offset;
rc= _string_check(self, initial_size);
if (rc != MEMCACHED_SUCCESS)
{
+ if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
+ {
+ ((memcached_st *)memc)->cached_errno= errno;
+ }
libmemcached_free(memc, self);
+
return NULL;
}
rc= _string_check(string, 1);
if (rc != MEMCACHED_SUCCESS)
+ {
return rc;
+ }
*string->end= character;
string->end++;
rc= _string_check(string, length);
if (rc != MEMCACHED_SUCCESS)
+ {
return rc;
+ }
WATCHPOINT_ASSERT(length <= string->current_size);
WATCHPOINT_ASSERT(string->string);
{
self->end= self->string + length;
}
+
+memcached_string_t memcached_string_make(const char *str, size_t length)
+{
+ memcached_string_t tmp;
+ tmp.c_str= str;
+ tmp.size= length;
+
+ return tmp;
+}