#include "php_http.h"
-/* API */
+#include <main/SAPI.h>
+#include <ext/spl/spl_iterators.h>
+#include <Zend/zend_interfaces.h>
PHP_HTTP_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
{
PHP_HTTP_API php_http_message_t *php_http_message_parse(php_http_message_t *msg, const char *str, size_t len TSRMLS_DC)
{
php_http_message_parser_t p;
- php_http_buffer buf;
+ php_http_buffer_t buf;
if (!msg) {
msg = php_http_message_init(NULL, 0 TSRMLS_CC);
if (join && Z_TYPE_PP(header) == IS_ARRAY) {
zval *header_str, **val;
HashPosition pos;
- php_http_buffer str;
+ php_http_buffer_t str;
php_http_buffer_init(&str);
MAKE_STD_ZVAL(header_str);
}
}
-static inline void message_headers(php_http_message_t *msg, php_http_buffer *str)
+static inline void message_headers(php_http_message_t *msg, php_http_buffer_t *str)
{
php_http_array_hashkey_t key = php_http_array_hashkey_init(0);
HashPosition pos1;
PHP_HTTP_API void php_http_message_to_callback(php_http_message_t *msg, php_http_pass_callback_t cb, void *cb_arg)
{
- php_http_buffer str;
+ php_http_buffer_t str;
TSRMLS_FETCH_FROM_CTX(msg->ts);
php_http_buffer_init_ex(&str, 0x1000, 0);
PHP_HTTP_API void php_http_message_to_string(php_http_message_t *msg, char **string, size_t *length)
{
- php_http_buffer str;
+ php_http_buffer_t str;
char *data;
php_http_buffer_init_ex(&str, 0x1000, 0);
{
char *buf;
size_t len;
- php_http_buffer str;
+ php_http_buffer_t str;
php_http_buffer_init(&str);
}
}
-
-/* PHP */
-
#define PHP_HTTP_BEGIN_ARGS(method, req_args) PHP_HTTP_BEGIN_ARGS_EX(HttpMessage, method, 0, req_args)
#define PHP_HTTP_EMPTY_ARGS(method) PHP_HTTP_EMPTY_ARGS_EX(HttpMessage, method, 0)
#define PHP_HTTP_MESSAGE_ME(method, visibility) PHP_ME(HttpMessage, method, PHP_HTTP_ARGS(HttpMessage, method), visibility)