tests
[m6w6/ext-http] / php_http_message_parser.c
index 9accc354882ac2374092a6cf9a90765954033038..cf4d4fa3ec48cd0aabeea3cac9198770abff7506 100644 (file)
@@ -1,4 +1,16 @@
-#include "php_http.h"
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
+*/
+
+#include "php_http_api.h"
 
 typedef struct php_http_message_parser_state_spec {
        php_http_message_parser_state_t state;
@@ -74,10 +86,10 @@ PHP_HTTP_API void php_http_message_parser_dtor(php_http_message_parser_t *parser
        php_http_header_parser_dtor(&parser->header);
        zend_stack_destroy(&parser->stack);
        if (parser->dechunk) {
-               php_http_encoding_stream_free(&parser->dechunk TSRMLS_CC);
+               php_http_encoding_stream_free(&parser->dechunk);
        }
        if (parser->inflate) {
-               php_http_encoding_stream_free(&parser->inflate TSRMLS_CC);
+               php_http_encoding_stream_free(&parser->inflate);
        }
 }
 
@@ -277,7 +289,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h
                                                char *dec_str = NULL;
                                                size_t dec_len;
 
-                                               if (SUCCESS != php_http_encoding_stream_update(parser->inflate, str, len, &dec_str, &dec_len TSRMLS_CC)) {
+                                               if (SUCCESS != php_http_encoding_stream_update(parser->inflate, str, len, &dec_str, &dec_len)) {
                                                        return php_http_message_parser_state_push(parser, 1, PHP_HTTP_MESSAGE_PARSER_STATE_FAILURE);
                                                }
 
@@ -345,7 +357,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h
                                char *dec_str = NULL;
                                size_t dec_len;
 
-                               if (SUCCESS != php_http_encoding_stream_update(parser->dechunk, buffer->data, buffer->used, &dec_str, &dec_len TSRMLS_CC)) {
+                               if (SUCCESS != php_http_encoding_stream_update(parser->dechunk, buffer->data, buffer->used, &dec_str, &dec_len)) {
                                        return FAILURE;
                                }
 
@@ -370,7 +382,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h
                                        char *dec_str = NULL;
                                        size_t dec_len;
 
-                                       if (SUCCESS != php_http_encoding_stream_finish(parser->dechunk, &dec_str, &dec_len TSRMLS_CC)) {
+                                       if (SUCCESS != php_http_encoding_stream_finish(parser->dechunk, &dec_str, &dec_len)) {
                                                return php_http_message_parser_state_push(parser, 1, PHP_HTTP_MESSAGE_PARSER_STATE_FAILURE);
                                        }
                                        php_http_encoding_stream_dtor(parser->dechunk);
@@ -401,3 +413,13 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h
 
        return php_http_message_parser_state_is(parser);
 }
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+