fix PHP-5.4 compatibility§
authorMichael Wallner <mike@php.net>
Mon, 4 Aug 2014 08:45:19 +0000 (10:45 +0200)
committerMichael Wallner <mike@php.net>
Mon, 4 Aug 2014 08:45:19 +0000 (10:45 +0200)
php_http.h
php_http_header_parser.c
php_http_message_parser.c

index 72670089e143978455d034e0d8f5ce931bbe060a..c549d0639fbc0e04fd51564b225dfa7acead0201 100644 (file)
@@ -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
index f560a8561a5917f241500b1c53a647f28e60a66e..ec41a240e66a8a4cf3881d86af759be0879df998 100644 (file)
@@ -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;
index 6328fa49e503a04944c618cb3ca56a38dcaccd57..20ef3acc776b664e6cc4d78d7a440cd89f384d5d 100644 (file)
@@ -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;
 }