mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use reference counting instead of zval duplication
This commit is contained in:
parent
3d87391cc0
commit
c1965f58d4
47 changed files with 915 additions and 878 deletions
|
@ -775,12 +775,10 @@ PHP_FUNCTION(xmlrpc_decode_request)
|
|||
zval *method;
|
||||
int xml_len, encoding_len = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|s", &xml, &xml_len, &method, &encoding, &encoding_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|s", &xml, &xml_len, &method, &encoding, &encoding_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
ZVAL_DEREF(method);
|
||||
|
||||
if (USED_RET()) {
|
||||
decode_request_worker(xml, xml_len, encoding_len ? encoding : NULL, method, return_value);
|
||||
}
|
||||
|
@ -1377,12 +1375,10 @@ PHP_FUNCTION(xmlrpc_set_type)
|
|||
int type_len;
|
||||
XMLRPC_VALUE_TYPE vtype;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &arg, &type, &type_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/s", &arg, &type, &type_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
ZVAL_DEREF(arg);
|
||||
|
||||
vtype = xmlrpc_str_as_type(type);
|
||||
if (vtype != xmlrpc_none) {
|
||||
if (set_zval_xmlrpc_type(arg, vtype) == SUCCESS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue