com php-src: Don't separate output arguments: ext/pcre/php_pc re.c ext/standard/streamsfuncs.c ext/standard/string. c

[email protected] (Dmitry Stogov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    dd4a78b631b356beb8c7b5ab7f58a91008143d5a
Author:    Dmitry Stogov <[email protected]>         Tue, 23 May 2017 17:18:05 +0300
Parents:   490960d8610821fade0833625e2c8b58c4a99271
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=dd4a78b631b356beb8c7b5ab7f58a91008143d5a

Log:
Don't separate output arguments

Changed paths:
  M  ext/pcre/php_pcre.c
  M  ext/standard/streamsfuncs.c
  M  ext/standard/string.c


Diff:
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 0890e52..324a4ac 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -677,7 +677,7 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ *
 		Z_PARAM_STR(regex)
 		Z_PARAM_STR(subject)
 		Z_PARAM_OPTIONAL
-		Z_PARAM_ZVAL_EX(subpats, 0, 1)
+		Z_PARAM_ZVAL_DEREF(subpats)
 		Z_PARAM_LONG(flags)
 		Z_PARAM_LONG(start_offset)
 	ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
@@ -1613,7 +1613,7 @@ static PHP_FUNCTION(preg_replace)
 		Z_PARAM_ZVAL(subject)
 		Z_PARAM_OPTIONAL
 		Z_PARAM_LONG(limit)
-		Z_PARAM_ZVAL_EX(zcount, 0, 1)
+		Z_PARAM_ZVAL_DEREF(zcount)
 	ZEND_PARSE_PARAMETERS_END();
 
 	if (Z_TYPE_P(replace) == IS_ARRAY && Z_TYPE_P(regex) != IS_ARRAY) {
@@ -1645,7 +1645,7 @@ static PHP_FUNCTION(preg_replace_callback)
 		Z_PARAM_ZVAL(subject)
 		Z_PARAM_OPTIONAL
 		Z_PARAM_LONG(limit)
-		Z_PARAM_ZVAL_EX(zcount, 0, 1)
+		Z_PARAM_ZVAL_DEREF(zcount)
 	ZEND_PARSE_PARAMETERS_END();
 
 	if (!zend_is_callable(replace, 0, &callback_name)) {
@@ -1680,7 +1680,7 @@ static PHP_FUNCTION(preg_replace_callback_array)
 		Z_PARAM_ZVAL(subject)
 		Z_PARAM_OPTIONAL
 		Z_PARAM_LONG(limit)
-		Z_PARAM_ZVAL_EX(zcount, 0, 1)
+		Z_PARAM_ZVAL_DEREF(zcount)
 	ZEND_PARSE_PARAMETERS_END();
 
 	ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(pattern), str_idx, replace) {
@@ -1741,7 +1741,7 @@ static PHP_FUNCTION(preg_filter)
 		Z_PARAM_ZVAL(subject)
 		Z_PARAM_OPTIONAL
 		Z_PARAM_LONG(limit)
-		Z_PARAM_ZVAL_EX(zcount, 0, 1)
+		Z_PARAM_ZVAL_DEREF(zcount)
 	ZEND_PARSE_PARAMETERS_END();
 
 	if (Z_TYPE_P(replace) == IS_ARRAY && Z_TYPE_P(regex) != IS_ARRAY) {
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 8e225f3..e243ce9 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -267,7 +267,7 @@ PHP_FUNCTION(stream_socket_accept)
 		Z_PARAM_RESOURCE(zstream)
 		Z_PARAM_OPTIONAL
 		Z_PARAM_DOUBLE(timeout)
-		Z_PARAM_ZVAL_EX(zpeername, 0, 1)
+		Z_PARAM_ZVAL_DEREF(zpeername)
 	ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
 
 	php_stream_from_zval(stream, zstream);
@@ -282,7 +282,7 @@ PHP_FUNCTION(stream_socket_accept)
 	tv.tv_usec = conv % 1000000;
 #endif
 	if (zpeername) {
-		zval_dtor(zpeername);
+		zval_ptr_dtor(zpeername);
 		ZVAL_NULL(zpeername);
 	}
 
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 83f5901..4c46099 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4103,7 +4103,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
 		Z_PARAM_ZVAL(replace)
 		Z_PARAM_ZVAL(subject)
 		Z_PARAM_OPTIONAL
-		Z_PARAM_ZVAL_EX(zcount, 0, 1)
+		Z_PARAM_ZVAL_DEREF(zcount)
 	ZEND_PARSE_PARAMETERS_END();
 
 	/* Make sure we're dealing with strings and do the replacement. */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.