X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_header_parser.c;h=6700c496865d62cb7f7bbc1d1d33455921cc55d7;hp=cd76b763cc6b4642c2256265077480d830c67ab9;hb=e44e3ceb60817cfdd17945a3f6043816e134aa75;hpb=018096825617afa428c9c17f83b1ad3f3f3f96e5 diff --git a/src/php_http_header_parser.c b/src/php_http_header_parser.c index cd76b76..6700c49 100644 --- a/src/php_http_header_parser.c +++ b/src/php_http_header_parser.c @@ -40,7 +40,13 @@ php_http_header_parser_t *php_http_header_parser_init(php_http_header_parser_t * return parser; } -#define php_http_header_parser_state_push(parser, state) zend_ptr_stack_push(&(parser)->stack, (void *) (state)), (state) +static inline php_http_header_parser_state_t +php_http_header_parser_state_push(php_http_header_parser_t *parser, php_http_header_parser_state_t state) +{ + zend_ptr_stack_push(&(parser)->stack, (void *) (state)); + return state; +} + #define php_http_header_parser_state_ex(parser) ((parser)->stack.top \ ? (php_http_header_parser_state_t) (parser)->stack.elements[(parser)->stack.top - 1] \ : PHP_HTTP_HEADER_PARSER_STATE_START) @@ -428,7 +434,7 @@ static zend_function_entry php_http_header_parser_methods[] = { PHP_ME(HttpHeaderParser, getState, ai_HttpHeaderParser_getState, ZEND_ACC_PUBLIC) PHP_ME(HttpHeaderParser, parse, ai_HttpHeaderParser_parse, ZEND_ACC_PUBLIC) PHP_ME(HttpHeaderParser, stream, ai_HttpHeaderParser_stream, ZEND_ACC_PUBLIC) - {NULL, NULL, NULL} + {0} }; PHP_MINIT_FUNCTION(http_header_parser)