memcp.pod\\r
memcached_delete.pod\\r
memcached_set.pod\\r
+ memcached_version.pod\\r
memflush.pod\r
\r
man_MANS = libmemcached.3\\r
memcached_stat_servername.3\\r
memcached_strerror.3\\r
memcached_quit.3\\r
- memcached_verbosity.3\r
+ memcached_verbosity.3\\r
+ memcached_lib_version.3\\r
+ memcached_version.3\r
\r
libmemcached.3: libmemcached.pod \r
pod2man -c "libmemcached" -r "" -s 3 libmemcached.pod > libmemcached.3\r
memcached_result_cas.3: memcached_result_st.pod\r
pod2man -c "libmemcached" -r "" -s 3 memcached_result_st.pod > memcached_result_cas.3\r
\r
+memcached_version.3: memcached_version.pod\r
+ pod2man -c "libmemcached" -r "" -s 3 memcached_version.pod > memcached_version.3\r
+\r
+memcached_lib_version.3: memcached_version.pod\r
+ pod2man -c "libmemcached" -r "" -s 3 memcached_version.pod > memcached_lib_version.3\r
+\r
memcp.1: memcp.pod\r
pod2man -c "libmemcached" -r "" -s 1 memcp.pod > memcp.1\r
\r
memflush.1: memflush.pod\r
pod2man -c "libmemcached" -r "" -s 1 memflush.pod > memflush.1\r
\r
+\r
clean:\r
rm -f *.1\r
rm -f *.3\r
Maximum allowed size of the hostname.
+=item MEMCACHED_VERSION_STRING
+
+String value of libmemcached version such as "1.23.4"
+
+=item MEMCACHED_MAJOR_VERSION
+
+Major version value. Such as 1.23.4, would be 1
+
+=item MEMCACHED_MINOR_VERSION
+
+Major version value. Such as 1.23.4, would be 23
+
+=item MEMCACHED_MICRO_VERSION
+
+Major version value. Such as 1.23.4, would be 4
+
+
=back
#define MEMCACHED_STRIDE 4
#define MEMCACHED_DEFAULT_TIMEOUT INT32_MAX
+/* string value */
+#define MEMCACHED_VERSION_STRING "0.14"
+/* binary values */
+#define MEMCACHED_MAJOR_VERSION 0
+#define MEMCACHED_MAJOR_VERSION 14
+#define MEMCACHED_MICRO_VERSION 0
+
typedef enum {
MEMCACHED_SUCCESS,
MEMCACHED_FAILURE,
};
/* Public API */
+const char * memcached_lib_version(void);
+
memcached_st *memcached_create(memcached_st *ptr);
void memcached_free(memcached_st *ptr);
memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr);
#include "common.h"
+const char * memcached_lib_version(void) {
+ return LIBMEMCACHED_VERSION_STRING;
+}
+
memcached_return memcached_version(memcached_st *ptr)
{
unsigned int x;
return 0;
}
+uint8_t version_string_test
+{
+ const char *version_string;
+ version_string= memcached_lib_version();
+ assert(!strcmp(version_string, MEMCACHE_VERSION_STRING));
+ return 0;
+}
+
uint8_t get_stats(memcached_st *memc)
{
unsigned int x;
{"get_stats_keys", 0, get_stats_keys },
{"behavior_test", 0, get_stats_keys },
{"callback_test", 0, get_stats_keys },
+ {"version_string_test", 0, version_string_test},
{0, 0, 0}
};