projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
3e75fa7
)
* zval_add_ref() expects zval **
author
Michael Wallner
<mike@php.net>
Fri, 18 Mar 2005 10:40:04 +0000
(10:40 +0000)
committer
Michael Wallner
<mike@php.net>
Fri, 18 Mar 2005 10:40:04 +0000
(10:40 +0000)
http_methods.c
patch
|
blob
|
history
diff --git
a/http_methods.c
b/http_methods.c
index e4042a11c9b805fcdae5051d74717cf43a653e48..0f80c6ce21e3441e3772523953ebf1de35ac689b 100644
(file)
--- 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);
PHP_METHOD(HTTPi_Request, unsetOptions)
{
getObject(httpi_request_object, obj);
-
+
NO_ARGS;
NO_ARGS;
-
+
FREE_PARR(obj, options);
INIT_PARR(obj, options);
}
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);
{
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;
}
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &new_headers)) {
RETURN_FALSE;
}
-
+
opts = GET_PROP(obj, options);
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 {
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);
}
add_assoc_zval(opts, "headers", new_headers);
}
-
+
RETURN_TRUE;
}
/* }}} */
RETURN_TRUE;
}
/* }}} */
@@
-677,20
+677,20
@@
PHP_METHOD(HTTPi_Request, addCookie)
{
zval *opts, **cookies, *new_cookies;
getObject(httpi_request_object, obj);
{
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;
}
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &new_cookies)) {
RETURN_FALSE;
}
-
+
opts = GET_PROP(obj, options);
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 {
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);
}
add_assoc_zval(opts, "cookies", new_cookies);
}
-
+
RETURN_TRUE;
}
/* }}} */
RETURN_TRUE;
}
/* }}} */