From fc854846a803a8e827beca515ff803643b15b588 Mon Sep 17 00:00:00 2001 From: Dustin Sallings Date: Tue, 24 Mar 2009 08:37:04 -0700 Subject: Added APPEND_STAT2 --- memcached.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.1