X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=inline;f=src%2Fphp_http_header.c;fp=src%2Fphp_http_header.c;h=f31e0847e2f22dab40782a68211fb7310186b9c4;hb=cc8acf603d067ea4ad52e676e43f03701728eb9d;hp=d4f2b510b311e69f3f2bde61fd6825f97ed81748;hpb=a45c7a64ecf8422deed20efe256d5f5885679ba2;p=m6w6%2Fext-http diff --git a/src/php_http_header.c b/src/php_http_header.c index d4f2b51..f31e084 100644 --- a/src/php_http_header.c +++ b/src/php_http_header.c @@ -116,6 +116,12 @@ zend_string *php_http_header_value_to_string(zval *header) } } +static zend_class_entry *php_http_header_class_entry; +zend_class_entry *php_http_header_get_class_entry(void) +{ + return php_http_header_class_entry; +} + ZEND_BEGIN_ARG_INFO_EX(ai_HttpHeader___construct, 0, 0, 0) ZEND_ARG_INFO(0, name) ZEND_ARG_INFO(0, value) @@ -276,7 +282,7 @@ PHP_METHOD(HttpHeader, getParams) ZVAL_STRINGL(&zctor, "__construct", lenof("__construct")); - object_init_ex(&zparams_obj, php_http_params_class_entry); + object_init_ex(&zparams_obj, php_http_params_get_class_entry()); zargs = (zval *) ecalloc(ZEND_NUM_ARGS()+1, sizeof(zval)); ZVAL_COPY_VALUE(&zargs[0], zend_read_property(php_http_header_class_entry, getThis(), ZEND_STRL("value"), 0, &value_tmp)); @@ -356,8 +362,6 @@ static zend_function_entry php_http_header_methods[] = { EMPTY_FUNCTION_ENTRY }; -zend_class_entry *php_http_header_class_entry; - PHP_MINIT_FUNCTION(http_header) { zend_class_entry ce = {0};