value, value_length, 0, 0);
}
memcached_return cas(const char *key, const char *value,
- size_t value_length, uint64_t cas)
+ size_t value_length, uint64_t cas_arg)
{
return memcached_cas(&memc, key, strlen(key),
- value, value_length, 0, 0, cas);
+ value, value_length, 0, 0, cas_arg);
}
memcached_return cas_by_key(const char *master_key, const char *key,
const char *value, size_t value_length,
- uint64_t cas)
+ uint64_t cas_arg)
{
return memcached_cas_by_key(&memc,
master_key, strlen(master_key),
key, strlen(key),
value, value_length,
- 0, 0, cas);
+ 0, 0, cas_arg);
}
// using 'remove' vs. 'delete' since 'delete' is a keyword
memcached_return remove(const char *key)
#include "common.h"
static memcached_return ascii_dump(memcached_st *ptr, memcached_dump_func *callback, void *context, uint32_t number_of_callbacks)
{
- memcached_return rc;
+ memcached_return rc= 0;
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
size_t send_length;
uint32_t server_key;
/* Too many broken OS'es have broken loopback in async, so we can't be sure of the result */
if (setting_value)
- assert(rc == MEMCACHED_NOTSTORED || MEMCACHED_STORED);
+ assert(rc == MEMCACHED_NOTSTORED || rc == MEMCACHED_STORED);
else
assert(rc == MEMCACHED_NOTSTORED);
mcach.set(key, inc_value, strlen(inc_value));
ret_value= mcach.get(key, &value_length);
printf("\nretvalue %s\n",ret_value);
- int_inc_value= atoi(inc_value);
- int_ret_value= atoi(ret_value);
+ int_inc_value= uint64_t(atol(inc_value));
+ int_ret_value= uint64_t(atol(ret_value));
assert(int_ret_value == int_inc_value);
rc= mcach.increment(key, 1, &int_ret_value);