char *key;
size_t prefix_length;
- key= result->key;
+ key= result->item_key;
result->key_length= 0;
for (prefix_length= ptr->root->prefix_key_length; !(iscntrl(*string_ptr) || isspace(*string_ptr)) ; string_ptr++)
else
prefix_length--;
}
- result->key[result->key_length]= 0;
+ result->item_key[result->key_length]= 0;
}
if (end_ptr == string_ptr)
if (end_ptr == string_ptr)
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- result->flags= (uint32_t) strtoul(next_ptr, &string_ptr, 10);
+ result->item_flags= (uint32_t) strtoul(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
goto read_error;
{
string_ptr++;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- result->cas= strtoull(next_ptr, &string_ptr, 10);
+ result->item_cas= strtoull(next_ptr, &string_ptr, 10);
}
if (end_ptr < string_ptr)
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
}
- value_ptr= memcached_string_value(&result->value);
+ value_ptr= memcached_string_value_mutable(&result->value);
/*
We read the \r\n into the string since not doing so is more
cycles then the waster of memory to do so.
/* This next bit blows the API, but this is internal....*/
{
char *char_ptr;
- char_ptr= memcached_string_value(&result->value);;
+ char_ptr= memcached_string_value_mutable(&result->value);;
char_ptr[value_length]= 0;
char_ptr[value_length + 1]= 0;
memcached_string_set_length(&result->value, value_length);
memory in the struct, which is important, for something that
rarely should happen?
*/
- rel_ptr= (char *)ptr->root->call_realloc(ptr->root,
- ptr->cached_server_error,
- (size_t) (endptr - startptr + 1));
+ rel_ptr= (char *)libmemcached_realloc(ptr->root,
+ ptr->cached_server_error,
+ (size_t) (endptr - startptr + 1));
if (rel_ptr == NULL)
{
{
uint16_t keylen= header.response.keylen;
memcached_result_reset(result);
- result->cas= header.response.cas;
+ result->item_cas= header.response.cas;
- if (memcached_safe_read(ptr, &result->flags,
- sizeof (result->flags)) != MEMCACHED_SUCCESS)
+ if (memcached_safe_read(ptr, &result->item_flags,
+ sizeof (result->item_flags)) != MEMCACHED_SUCCESS)
return MEMCACHED_UNKNOWN_READ_FAILURE;
- result->flags= ntohl(result->flags);
+ result->item_flags= ntohl(result->item_flags);
bodylen -= header.response.extlen;
result->key_length= keylen;
- if (memcached_safe_read(ptr, result->key, keylen) != MEMCACHED_SUCCESS)
+ if (memcached_safe_read(ptr, result->item_key, keylen) != MEMCACHED_SUCCESS)
return MEMCACHED_UNKNOWN_READ_FAILURE;
bodylen -= keylen;
bodylen) != MEMCACHED_SUCCESS)
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
- char *vptr= memcached_string_value(&result->value);
+ char *vptr= memcached_string_value_mutable(&result->value);
if (memcached_safe_read(ptr, vptr, bodylen) != MEMCACHED_SUCCESS)
return MEMCACHED_UNKNOWN_READ_FAILURE;