X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_message.c;h=5a278f68c675f14cc51a24eaad7cdbb4cfce4ec4;hp=8a7e564a761990743270c2e7c736de49cc2471ce;hb=68902d1bedcc8c23f8907d023d325ce8a40196c1;hpb=2e8a57c215cf1e5955a141636c1a7c154a7798ab diff --git a/php_http_message.c b/php_http_message.c index 8a7e564..5a278f6 100644 --- a/php_http_message.c +++ b/php_http_message.c @@ -1161,17 +1161,19 @@ static PHP_METHOD(HttpMessage, getHeader) if (!header_ce) { RETURN_ZVAL(header, 1, 1); } else if (instanceof_function(header_ce, php_http_header_class_entry TSRMLS_CC)) { + php_http_object_method_t cb; zval *header_name, **argv[2]; MAKE_STD_ZVAL(header_name); ZVAL_STRINGL(header_name, header_str, header_len, 1); - Z_ADDREF_P(header); argv[0] = &header_name; argv[1] = &header; object_init_ex(return_value, header_ce); - php_http_method_call(return_value, ZEND_STRL("__construct"), 2, argv, NULL TSRMLS_CC); + php_http_object_method_init(&cb, return_value, ZEND_STRL("__construct") TSRMLS_CC); + php_http_object_method_call(&cb, return_value, NULL, 2, argv TSRMLS_CC); + php_http_object_method_dtor(&cb); zval_ptr_dtor(&header_name); zval_ptr_dtor(&header);