From: Michael Wallner Date: Tue, 14 Jun 2005 17:39:17 +0000 (+0000) Subject: - fix HttpRequest::getResponseMessage() X-Git-Tag: RELEASE_0_9_0~14 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=92d91587592727bbf0369e6eae8eba157063274d;p=m6w6%2Fext-http - fix HttpRequest::getResponseMessage() --- diff --git a/http_methods.c b/http_methods.c index 1e454d8..d71c2ca 100644 --- a/http_methods.c +++ b/http_methods.c @@ -2069,12 +2069,10 @@ PHP_METHOD(HttpRequest, getResponseMessage) getObject(http_request_object, obj); message = GET_PROP(obj, responseMessage); - Z_TYPE_P(return_value) = IS_OBJECT; - return_value->is_ref = 1; - return_value->value.obj = message->value.obj; - zval_add_ref(&return_value); + RETVAL_OBJECT(message); } } +/* }}} */ /* {{{ proto bool HttpRequest::send() * @@ -2333,3 +2331,4 @@ PHP_METHOD(HttpRequestPool, socketRead) * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */ + diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 0024685..86f2ec0 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -46,10 +46,7 @@ typedef int STATUS; #define RETURN_SUCCESS(v) RETURN_BOOL(SUCCESS == (v)) /* return object(values) */ #define RETVAL_OBJECT(o) \ - return_value->is_ref = 1; \ - return_value->type = IS_OBJECT; \ - return_value->value.obj = (o)->value.obj; \ - zval_add_ref(&return_value) + RETVAL_OBJVAL((o)->value.obj) #define RETURN_OBJECT(o) \ RETVAL_OBJECT(o); \ return @@ -57,6 +54,7 @@ typedef int STATUS; return_value->is_ref = 1; \ return_value->type = IS_OBJECT; \ return_value->value.obj = (ov); \ + zval_add_ref(&return_value); \ zend_objects_store_add_ref(return_value TSRMLS_CC) #define RETURN_OBJVAL(ov) \ RETVAL_OBJVAL(ov); \