projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix macro usage
[m6w6/ext-http]
/
php_http_message.c
diff --git
a/php_http_message.c
b/php_http_message.c
index 75d7fe5396e9e4ab41c9125a040bbb559d4e4c30..de1f98f126fb36556b772d57aab1c3d1e9ac8aee 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-694,7
+694,7
@@
void php_http_message_object_reverse(zval *zmsg, zval *return_value)
efree(objects);
} else {
efree(objects);
} else {
- RETURN_ZVAL
_FAST(zmsg
);
+ RETURN_ZVAL
(zmsg, 1, 0
);
}
}
}
}
@@
-872,7
+872,14
@@
static zval *php_http_message_object_read_prop(zval *object, zval *member, int t
ZVAL_COPY_VALUE(return_value, tmp);
}
} else {
ZVAL_COPY_VALUE(return_value, tmp);
}
} else {
- return_value = php_property_proxy_zval(object, member_name);
+ php_property_proxy_t *proxy;
+ php_property_proxy_object_t *proxy_obj;
+
+ proxy = php_property_proxy_init(object, member_name);
+ proxy_obj = php_property_proxy_object_new_ex(NULL, proxy);
+
+ ZVAL_OBJ(tmp, &proxy_obj->zo);
+ return tmp;
}
zend_string_release(member_name);
}
zend_string_release(member_name);
@@
-1072,7
+1079,7
@@
static PHP_METHOD(HttpMessage, setBody)
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
php_http_message_object_prophandler_set_body(obj, zbody);
}
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
php_http_message_object_prophandler_set_body(obj, zbody);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_addBody, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_addBody, 0, 0, 1)
@@
-1089,7
+1096,7
@@
static PHP_METHOD(HttpMessage, addBody)
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
php_http_message_body_to_callback(new_obj->body, (php_http_pass_callback_t) php_http_message_body_append, obj->message->body, 0, 0);
}
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
php_http_message_body_to_callback(new_obj->body, (php_http_pass_callback_t) php_http_message_body_append, obj->message->body, 0, 0);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getHeader, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getHeader, 0, 0, 1)
@@
-1110,7
+1117,7
@@
static PHP_METHOD(HttpMessage, getHeader)
if ((header = php_http_message_header(obj->message, header_str, header_len))) {
if (!header_ce) {
if ((header = php_http_message_header(obj->message, header_str, header_len))) {
if (!header_ce) {
- RETURN_ZVAL
_FAST(header
);
+ RETURN_ZVAL
(header, 1, 0
);
} else if (instanceof_function(header_ce, php_http_header_class_entry)) {
php_http_object_method_t cb;
zval argv[2];
} else if (instanceof_function(header_ce, php_http_header_class_entry)) {
php_http_object_method_t cb;
zval argv[2];
@@
-1173,7
+1180,7
@@
static PHP_METHOD(HttpMessage, setHeader)
}
efree(name);
}
}
efree(name);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_setHeaders, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_setHeaders, 0, 0, 1)
@@
-1193,7
+1200,7
@@
static PHP_METHOD(HttpMessage, setHeaders)
array_join(Z_ARRVAL_P(new_headers), &obj->message->hdrs, 0, ARRAY_JOIN_PRETTIFY|ARRAY_JOIN_STRONLY);
}
}
array_join(Z_ARRVAL_P(new_headers), &obj->message->hdrs, 0, ARRAY_JOIN_PRETTIFY|ARRAY_JOIN_STRONLY);
}
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_addHeader, 0, 0, 2)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_addHeader, 0, 0, 2)
@@
-1222,7
+1229,7
@@
static PHP_METHOD(HttpMessage, addHeader)
}
efree(name);
}
}
efree(name);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_addHeaders, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_addHeaders, 0, 0, 1)
@@
-1241,7
+1248,7
@@
static PHP_METHOD(HttpMessage, addHeaders)
array_join(Z_ARRVAL_P(new_headers), &obj->message->hdrs, append, ARRAY_JOIN_STRONLY|ARRAY_JOIN_PRETTIFY);
}
array_join(Z_ARRVAL_P(new_headers), &obj->message->hdrs, append, ARRAY_JOIN_STRONLY|ARRAY_JOIN_PRETTIFY);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getType, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getType, 0, 0, 0)
@@
-1271,7
+1278,7
@@
static PHP_METHOD(HttpMessage, setType)
php_http_message_set_type(obj->message, type);
}
php_http_message_set_type(obj->message, type);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getInfo, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getInfo, 0, 0, 0)
@@
-1326,7
+1333,7
@@
static PHP_METHOD(HttpMessage, setInfo)
php_http_message_set_info(obj->message, &inf);
php_http_info_dtor(&inf);
php_http_message_set_info(obj->message, &inf);
php_http_info_dtor(&inf);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getHttpVersion, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getHttpVersion, 0, 0, 0)
@@
-1364,7
+1371,7
@@
static PHP_METHOD(HttpMessage, setHttpVersion)
obj->message->http.version = version;
obj->message->http.version = version;
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getResponseCode, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getResponseCode, 0, 0, 0)
@@
-1413,7
+1420,7
@@
static PHP_METHOD(HttpMessage, setResponseCode)
obj->message->http.info.response.code = code;
PTR_SET(obj->message->http.info.response.status, estrdup(php_http_env_get_response_status_for_code(code)));
obj->message->http.info.response.code = code;
PTR_SET(obj->message->http.info.response.status, estrdup(php_http_env_get_response_status_for_code(code)));
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getResponseStatus, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getResponseStatus, 0, 0, 0)
@@
-1457,7
+1464,7
@@
static PHP_METHOD(HttpMessage, setResponseStatus)
}
PTR_SET(obj->message->http.info.response.status, estrndup(status, status_len));
}
PTR_SET(obj->message->http.info.response.status, estrndup(status, status_len));
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getRequestMethod, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getRequestMethod, 0, 0, 0)
@@
-1508,7
+1515,7
@@
static PHP_METHOD(HttpMessage, setRequestMethod)
}
PTR_SET(obj->message->http.info.request.method, estrndup(method, method_len));
}
PTR_SET(obj->message->http.info.request.method, estrndup(method, method_len));
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getRequestUrl, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getRequestUrl, 0, 0, 0)
@@
-1569,7
+1576,7
@@
static PHP_METHOD(HttpMessage, setRequestUrl)
PTR_SET(obj->message->http.info.request.url, url);
}
PTR_SET(obj->message->http.info.request.url, url);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getParentMessage, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_getParentMessage, 0, 0, 0)
@@
-1654,7
+1661,7
@@
static PHP_METHOD(HttpMessage, toCallback)
zend_fcall_info_args_clear(&fcd.fci, 1);
zval_ptr_dtor(&fcd.fcz);
zend_fcall_info_args_clear(&fcd.fci, 1);
zval_ptr_dtor(&fcd.fcz);
- RETURN_ZVAL
_FAST(getThis()
);
+ RETURN_ZVAL
(getThis(), 1, 0
);
}
}
}
}
@@
-1748,7
+1755,7
@@
static PHP_METHOD(HttpMessage, prepend)
}
php_http_message_object_prepend(getThis(), prepend, top);
}
php_http_message_object_prepend(getThis(), prepend, top);
- RETURN_ZVAL
_FAST(getThis()
);
+ RETURN_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_reverse, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_reverse, 0, 0, 0)
@@
-1896,7
+1903,7
@@
static PHP_METHOD(HttpMessage, current)
php_http_message_object_t *obj = PHP_HTTP_OBJ(NULL, getThis());
if (!Z_ISUNDEF(obj->iterator)) {
php_http_message_object_t *obj = PHP_HTTP_OBJ(NULL, getThis());
if (!Z_ISUNDEF(obj->iterator)) {
- RETURN_ZVAL
_FAST(&obj->iterator
);
+ RETURN_ZVAL
(&obj->iterator, 1, 0
);
}
}
}
}
}
}