From: Michael Wallner Date: Mon, 4 Aug 2014 08:45:19 +0000 (+0200) Subject: fix PHP-5.4 compatibility§ X-Git-Tag: RELEASE_2_1_0_RC2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b0d5cbf0fc0e1c9ac8868dab045d17648cc084d9;p=m6w6%2Fext-http fix PHP-5.4 compatibility§ --- diff --git a/php_http.h b/php_http.h index 7267008..c549d06 100644 --- a/php_http.h +++ b/php_http.h @@ -13,7 +13,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_PECL_HTTP_VERSION "2.1.0RC1" +#define PHP_PECL_HTTP_VERSION "2.1.0RC2dev" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry diff --git a/php_http_header_parser.c b/php_http_header_parser.c index f560a85..ec41a24 100644 --- a/php_http_header_parser.c +++ b/php_http_header_parser.c @@ -62,7 +62,7 @@ php_http_header_parser_state_t php_http_header_parser_state_is(php_http_header_p php_http_header_parser_state_t state; if (parser->stack.top) { - return (php_http_header_parser_state_t) zend_ptr_stack_top(&parser->stack); + return (php_http_header_parser_state_t) parser->stack.elements[parser->stack.top - 1]; } return PHP_HTTP_HEADER_PARSER_STATE_START; diff --git a/php_http_message_parser.c b/php_http_message_parser.c index 6328fa4..20ef3ac 100644 --- a/php_http_message_parser.c +++ b/php_http_message_parser.c @@ -80,7 +80,7 @@ php_http_message_parser_state_t php_http_message_parser_state_push(php_http_mess php_http_message_parser_state_t php_http_message_parser_state_is(php_http_message_parser_t *parser) { if (parser->stack.top) { - return (php_http_message_parser_state_t) zend_ptr_stack_top(&parser->stack); + return (php_http_message_parser_state_t) parser->stack.elements[parser->stack.top - 1]; } return PHP_HTTP_MESSAGE_PARSER_STATE_START; }