com php-src: Eliminate useless separations: ext/filter/filter.c
| From: | Dmitry Stogov | Date: | Wed, 17 Jan 2018 08:59:01 +0000 |
| Subject: | com php-src: Eliminate useless separations: ext/filter/filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100925@lists.php.net to get a copy of this message | ||
Commit: 20b13fda09cb1796952899a259e5c7c0136b6b52
Author: Dmitry Stogov <dmitry@zend.com> Wed, 17 Jan 2018 11:59:01 +0300
Parents: ffa16693a7b2a90dbedf517330a1129b7c22bdf8
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=20b13fda09cb1796952899a259e5c7c0136b6b52
Log:
Eliminate useless separations
Changed paths:
M ext/filter/filter.c
Diff:
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 72a302a..7fe3bba 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -379,10 +379,6 @@ static void php_zval_filter(zval *value, zend_long filter, zend_long flags,
zval
filter_func = php_find_filter(FILTER_DEFAULT);
}
- if (copy) {
- SEPARATE_ZVAL(value);
- }
-
/* #49274, fatal error with object without a toString method
Fails nicely instead of getting a recovarable fatal error. */
if (Z_TYPE_P(value) == IS_OBJECT) {
@@ -634,9 +630,6 @@ static void php_filter_call(zval *filtered, zend_long filter, zval *filter_args,
if (Z_TYPE_P(filtered) == IS_ARRAY) {
if (filter_flags & FILTER_REQUIRE_SCALAR) {
- if (copy) {
- SEPARATE_ZVAL(filtered);
- }
zval_ptr_dtor(filtered);
if (filter_flags & FILTER_NULL_ON_FAILURE) {
ZVAL_NULL(filtered);
@@ -649,9 +642,6 @@ static void php_filter_call(zval *filtered, zend_long filter, zval *filter_args,
return;
}
if (filter_flags & FILTER_REQUIRE_ARRAY) {
- if (copy) {
- SEPARATE_ZVAL(filtered);
- }
zval_ptr_dtor(filtered);
if (filter_flags & FILTER_NULL_ON_FAILURE) {
ZVAL_NULL(filtered);