version.
+0.22
+ * Found a bug in Flags return (Jacek Ostrowski)
+ * Fixed issue with compiling on Visual Studio
+
0.21 Fri May 23 18:34:09 PDT 2008
* Change of char * to const char * for all key based functions.
* New MEMCACHED_CALLBACK_PREFIX_KEY added. You can now create domains for
#release versioning
MEMCACHED_MAJOR_VERSION=0
-MEMCACHED_MINOR_VERSION=21
+MEMCACHED_MINOR_VERSION=22
MEMCACHED_MICRO_VERSION=0
#API version
uint32_t value;
};
-#define LIBMEMCACHED_VERSION_STRING "0.21"
+#define LIBMEMCACHED_VERSION_STRING "0.22"
struct memcached_stat_st {
uint32_t pid;
}
else
{
- *value= (uint64_t)strtoll(buffer, (char **)NULL, 10);
+ *value= strtoull(buffer, (char **)NULL, 10);
rc= MEMCACHED_SUCCESS;
}
if (end_ptr == string_ptr)
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- result->flags= (uint32_t)strtol(next_ptr, &string_ptr, 10);
+ result->flags= strtoul(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
goto read_error;
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- value_length= (size_t)strtoll(next_ptr, &string_ptr, 10);
+ value_length= (size_t)strtoull(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= (size_t)strtoll(next_ptr, &string_ptr, 10);
+ result->cas= strtoull(next_ptr, &string_ptr, 10);
}
if (end_ptr < string_ptr)
ptr++;
- port= strtol(ptr, (char **)NULL, 10);
+ port= strtoul(ptr, (char **)NULL, 10);
}
servers= memcached_server_list_append(servers, buffer, port, &rc);
return "append";
case CAS_OP:
return "cas";
+ default:
+ return "tosserror"; /* This is impossible, fixes issue for compiler warning in VisualStudio */
};
return SET_OP;
return 0;
}
+/* Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly */
+test_return user_supplied_bug16(memcached_st *memc)
+{
+ uint32_t x;
+ memcached_return rc;
+ char *key= "mykey";
+ char *value;
+ size_t length;
+ uint32_t flags;
+
+ rc= memcached_set(memc, key, strlen(key),
+ NULL, 0,
+ (time_t)0, UINT32_MAX);
+
+ assert(rc == MEMCACHED_SUCCESS);
+
+ value= memcached_get(memc, key, strlen(key),
+ &length, &flags, &rc);
+
+ assert(rc == MEMCACHED_SUCCESS);
+ assert(value == NULL);
+ assert(length == 0);
+ assert(flags == UINT32_MAX);
+
+ return 0;
+}
+
test_return result_static(memcached_st *memc)
{
memcached_result_st result;
{"user_supplied_bug13", 1, user_supplied_bug13 },
{"user_supplied_bug14", 1, user_supplied_bug14 },
{"user_supplied_bug15", 1, user_supplied_bug15 },
+ {"user_supplied_bug16", 1, user_supplied_bug16 },
{0, 0, 0}
};