summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Sallings <dustin@spy.net>2009-03-24 08:37:04 -0700
committerDustin Sallings <dustin@spy.net>2009-03-24 13:17:36 -0700
commitfc854846a803a8e827beca515ff803643b15b588 (patch)
tree9eaec7bb4f549f51e1828e6736404fbd69011d99
parent0e779f76eda7e901966b3605f5e042e8829e43f5 (diff)
downloadmemcached-fc854846a803a8e827beca515ff803643b15b588.tar.gz
Added APPEND_STAT2
-rw-r--r--memcached.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/memcached.h b/memcached.h
index dd8414c..9c4f879 100644
--- a/memcached.h
+++ b/memcached.h
@@ -185,6 +185,14 @@ typedef struct _stritem {
pos += size; \
assert(*buflen < allocated);
+/* Append a simple stat with a stat name, value format and two values */
+#define APPEND_STAT2(name, fmt, val, val2) \
+ vlen = sprintf(val_str, fmt, val, val2); \
+ size = add_stats(pos, name, strlen(name), val_str, vlen, c); \
+ *buflen += size; \
+ pos += size; \
+ assert(*buflen < allocated);
+
/**
* NOTE: If you modify this table you _MUST_ update the function state_text