From: Michael Wallner Date: Fri, 18 Mar 2005 10:40:04 +0000 (+0000) Subject: * zval_add_ref() expects zval ** X-Git-Tag: RELEASE_0_7_0~31 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ef65a3f954762e08684b70b5a2e407edfa9c293b;p=m6w6%2Fext-http * zval_add_ref() expects zval ** --- diff --git a/http_methods.c b/http_methods.c index e4042a1..0f80c6c 100644 --- a/http_methods.c +++ b/http_methods.c @@ -635,9 +635,9 @@ PHP_METHOD(HTTPi_Request, getOptions) PHP_METHOD(HTTPi_Request, unsetOptions) { getObject(httpi_request_object, obj); - + NO_ARGS; - + FREE_PARR(obj, options); INIT_PARR(obj, options); } @@ -651,20 +651,20 @@ PHP_METHOD(HTTPi_Request, addHeader) { zval *opts, **headers, *new_headers; getObject(httpi_request_object, obj); - + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &new_headers)) { RETURN_FALSE; } - + opts = GET_PROP(obj, options); - + if (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), "headers", sizeof("headers"), (void **) &headers)) { array_merge(new_headers, *headers); } else { - zval_add_ref(new_headers); + zval_add_ref(&new_headers); add_assoc_zval(opts, "headers", new_headers); } - + RETURN_TRUE; } /* }}} */ @@ -677,20 +677,20 @@ PHP_METHOD(HTTPi_Request, addCookie) { zval *opts, **cookies, *new_cookies; getObject(httpi_request_object, obj); - + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &new_cookies)) { RETURN_FALSE; } - + opts = GET_PROP(obj, options); - + if (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), "cookies", sizeof("cookies"), (void **) &cookies)) { array_merge(new_cookies, *cookies); } else { - zval_add_ref(new_cookies); + zval_add_ref(&new_cookies); add_assoc_zval(opts, "cookies", new_cookies); } - + RETURN_TRUE; } /* }}} */