X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_message.h;h=6524a27ccb22661b5c9ae026225ccb3b30686655;hp=e94714f5af64896e1e984027c6865460242b5b46;hb=a4114b0ea5757190fdd7218dbf23588b6ae6e9a8;hpb=0b83632b2b0a03eeca090f993259ccd95ab646fb diff --git a/php_http_message.h b/php_http_message.h index e94714f..6524a27 100644 --- a/php_http_message.h +++ b/php_http_message.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2013, Michael Wallner | + | Copyright (c) 2004-2014, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -18,11 +18,6 @@ /* required minimum length of an HTTP message "HTTP/1.1" */ #define PHP_HTTP_MESSAGE_MIN_SIZE 8 #define PHP_HTTP_MESSAGE_TYPE(TYPE, msg) ((msg) && ((msg)->type == PHP_HTTP_ ##TYPE)) -#define PHP_HTTP_MESSAGE_TYPE_CHECK(type, msg, action) \ - if (!PHP_HTTP_MESSAGE_TYPE(type, (msg))) { \ - php_http_error(HE_NOTICE, PHP_HTTP_E_MESSAGE_TYPE, "HttpMessage is not of type "#type); \ - action; \ - } typedef php_http_info_type_t php_http_message_type_t; typedef struct php_http_message php_http_message_t; @@ -80,7 +75,7 @@ typedef struct php_http_message_object { zval *iterator; } php_http_message_object_t; -zend_class_entry *php_http_message_class_entry; +PHP_HTTP_API zend_class_entry *php_http_message_class_entry; PHP_MINIT_FUNCTION(http_message); PHP_MSHUTDOWN_FUNCTION(http_message); @@ -88,6 +83,7 @@ PHP_MSHUTDOWN_FUNCTION(http_message); void php_http_message_object_prepend(zval *this_ptr, zval *prepend, zend_bool top /* = 1 */ TSRMLS_DC); void php_http_message_object_reverse(zval *this_ptr, zval *return_value TSRMLS_DC); STATUS php_http_message_object_set_body(php_http_message_object_t *obj, zval *zbody TSRMLS_DC); +STATUS php_http_message_object_init_body_object(php_http_message_object_t *obj); zend_object_value php_http_message_object_new(zend_class_entry *ce TSRMLS_DC); zend_object_value php_http_message_object_new_ex(zend_class_entry *ce, php_http_message_t *msg, php_http_message_object_t **ptr TSRMLS_DC);