Merge pull request #53 from pgriess/callback_noclear

Get rid of CALLBACK_NOCLEAR().
v0.6
Peter Griess 14 years ago
commit 49faf2e9cd

@ -61,7 +61,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) { \
@ -73,14 +73,8 @@ do { \
return (p - data); \ return (p - data); \
} \ } \
} \ } \
} \
} while (0)
#define CALLBACK(FOR) \
do { \
CALLBACK_NOCLEAR(FOR); \
FOR##_mark = NULL; \ FOR##_mark = NULL; \
} \
} while (0) } while (0)
@ -1737,12 +1731,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