summaryrefslogtreecommitdiff
path: root/ext/standard/dns.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-06-19 12:55:59 +0300
committerDmitry Stogov <dmitry@zend.com>2017-06-19 12:55:59 +0300
commit9c2a1f52a5f087c70a9e91dc1f43e5718d1bd8b6 (patch)
tree3eb7097ebb986594ae03e54142240fca4b82e5f3 /ext/standard/dns.c
parent6fe75aad6da55e7ce473109e219fdc80bf3b7a51 (diff)
downloadphp-git-9c2a1f52a5f087c70a9e91dc1f43e5718d1bd8b6.tar.gz
Avoid useless dereferences and separations during paramter passing.
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r--ext/standard/dns.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 93cc2f8f90..58f214f2c7 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -808,17 +808,17 @@ PHP_FUNCTION(dns_get_record)
Z_PARAM_STRING(hostname, hostname_len)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(type_param)
- Z_PARAM_ZVAL_DEREF_EX(authns, 1, 1)
- Z_PARAM_ZVAL_DEREF_EX(addtl, 1, 1)
+ Z_PARAM_ZVAL_DEREF_EX(authns, 1, 0)
+ Z_PARAM_ZVAL_DEREF_EX(addtl, 1, 0)
Z_PARAM_BOOL(raw)
ZEND_PARSE_PARAMETERS_END();
if (authns) {
- zval_dtor(authns);
+ zval_ptr_dtor(authns);
array_init(authns);
}
if (addtl) {
- zval_dtor(addtl);
+ zval_ptr_dtor(addtl);
array_init(addtl);
}
@@ -1041,16 +1041,16 @@ PHP_FUNCTION(dns_get_mx)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STRING(hostname, hostname_len)
- Z_PARAM_ZVAL_DEREF_EX(mx_list, 0, 1)
+ Z_PARAM_ZVAL_DEREF(mx_list)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(weight_list, 0, 1)
+ Z_PARAM_ZVAL_DEREF(weight_list)
ZEND_PARSE_PARAMETERS_END();
- zval_dtor(mx_list);
+ zval_ptr_dtor(mx_list);
array_init(mx_list);
if (weight_list) {
- zval_dtor(weight_list);
+ zval_ptr_dtor(weight_list);
array_init(weight_list);
}