Get rid of CALLBACK_NOCLEAR().

- This was only used by CALLBACK() (which then cleared the mark anyway),
  and the end of the http_parser_execute() body (after which they
  go out of scope).
v0.6
Peter Griess 14 years ago
parent 1786fdae36
commit 5469827542

@ -58,7 +58,7 @@ do { \
FOR##_mark = p; \ FOR##_mark = p; \
} while (0) } while (0)
#define CALLBACK_NOCLEAR(FOR) \ #define CALLBACK(FOR) \
do { \ do { \
if (FOR##_mark) { \ if (FOR##_mark) { \
if (settings->on_##FOR) { \ if (settings->on_##FOR) { \
@ -70,17 +70,11 @@ do { \
return (p - data); \ return (p - data); \
} \ } \
} \ } \
FOR##_mark = NULL; \
} \ } \
} while (0) } while (0)
#define CALLBACK(FOR) \
do { \
CALLBACK_NOCLEAR(FOR); \
FOR##_mark = NULL; \
} while (0)
#define PROXY_CONNECTION "proxy-connection" #define PROXY_CONNECTION "proxy-connection"
#define CONNECTION "connection" #define CONNECTION "connection"
#define CONTENT_LENGTH "content-length" #define CONTENT_LENGTH "content-length"
@ -1736,12 +1730,12 @@ size_t http_parser_execute (http_parser *parser,
} }
} }
CALLBACK_NOCLEAR(header_field); CALLBACK(header_field);
CALLBACK_NOCLEAR(header_value); CALLBACK(header_value);
CALLBACK_NOCLEAR(fragment); CALLBACK(fragment);
CALLBACK_NOCLEAR(query_string); CALLBACK(query_string);
CALLBACK_NOCLEAR(path); CALLBACK(path);
CALLBACK_NOCLEAR(url); CALLBACK(url);
parser->state = state; parser->state = state;
parser->header_state = header_state; parser->header_state = header_state;

Loading…
Cancel
Save