Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
a25cd930
Commit
a25cd930
authored
Jul 07, 2011
by
Pieter Noordhuis
Browse files
Define state strings only in DEBUG mode
parent
df734805
Changes
1
Show whitespace changes
Inline
Side-by-side
parser.c
View file @
a25cd930
...
@@ -48,12 +48,6 @@ enum state {
...
@@ -48,12 +48,6 @@ enum state {
};
};
#undef _ENUM_GEN
#undef _ENUM_GEN
#define _ENUM_GEN(s) #s,
static
const
char
*
strstate
[]
=
{
REDIS_PARSER_STATES
(
_ENUM_GEN
)
};
#undef _ENUM_GEN
#define STATE(st) \
#define STATE(st) \
case s_##st: \
case s_##st: \
l_##st: \
l_##st: \
...
@@ -76,6 +70,12 @@ static const char * strstate[] = {
...
@@ -76,6 +70,12 @@ static const char * strstate[] = {
} while(0)
} while(0)
#ifdef DEBUG
#ifdef DEBUG
#define _ENUM_GEN(s) #s,
static
const
char
*
state_str
[]
=
{
REDIS_PARSER_STATES
(
_ENUM_GEN
)
};
#undef _ENUM_GEN
#define LOG(fmt, ...) do { \
#define LOG(fmt, ...) do { \
fprintf(stderr, fmt "\n", __VA_ARGS__); \
fprintf(stderr, fmt "\n", __VA_ARGS__); \
fflush(stderr); \
fflush(stderr); \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment