- fix HttpRequest::getResponseMessage()
authorMichael Wallner <mike@php.net>
Tue, 14 Jun 2005 17:39:17 +0000 (17:39 +0000)
committerMichael Wallner <mike@php.net>
Tue, 14 Jun 2005 17:39:17 +0000 (17:39 +0000)
http_methods.c
php_http_std_defs.h

index 1e454d83a3477dc884a98a07cb38bb0c48f6bfa2..d71c2caa6d4d7a5f4756ac6baabea975c6eabba0 100644 (file)
@@ -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
  */
+
index 00246859584ce7a7228f7010ed7613c57d770240..86f2ec0684e8842f85d29cb742764bb4b128f771 100644 (file)
@@ -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); \