Commit a25cd930 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Define state strings only in DEBUG mode

parent df734805
......@@ -48,12 +48,6 @@ enum state {
};
#undef _ENUM_GEN
#define _ENUM_GEN(s) #s,
static const char * strstate[] = {
REDIS_PARSER_STATES(_ENUM_GEN)
};
#undef _ENUM_GEN
#define STATE(st) \
case s_##st: \
l_##st: \
......@@ -76,6 +70,12 @@ static const char * strstate[] = {
} while(0)
#ifdef DEBUG
#define _ENUM_GEN(s) #s,
static const char *state_str[] = {
REDIS_PARSER_STATES(_ENUM_GEN)
};
#undef _ENUM_GEN
#define LOG(fmt, ...) do { \
fprintf(stderr, fmt "\n", __VA_ARGS__); \
fflush(stderr); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment