com php-src: Revert "We could do more....": ext/standard/array.c
| From: | Xinchen Hui | Date: | Fri, 16 Jan 2015 07:21:12 +0000 |
| Subject: | com php-src: Revert "We could do more....": ext/standard/array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84129@lists.php.net to get a copy of this message | ||
Commit: 1c9f91e682044ec8fdda46e0e7038ed623fb348b
Author: Xinchen Hui <laruence@php.net> Fri, 16 Jan 2015 15:21:12 +0800
Parents: af6119cf6c723514a1bab4887365eceaaf28f4d1
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1c9f91e682044ec8fdda46e0e7038ed623fb348b
Log:
Revert "We could do more...."
This reverts commit 11f615b3118f34dd8a118261d03c386d9dc0bbfd.
Changed paths:
M ext/standard/array.c
Diff:
diff --git a/ext/standard/array.c b/ext/standard/array.c
index e03cad3..251904e 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -3230,9 +3230,6 @@ PHP_FUNCTION(array_unique)
for (idx = 0; idx < i; idx++) {
cmpdata = &arTmp[idx];
if (Z_TYPE(cmpdata->b.val) != IS_UNDEF) {
-#if 1
- continue;
-#else
if (lastkept == NULL) {
lastkept = cmpdata;
continue;
@@ -3248,14 +3245,13 @@ PHP_FUNCTION(array_unique)
p = &cmpdata->b;
}
}
-#endif
} else {
p = &cmpdata->b;
}
if (p->key == NULL) {
zend_hash_index_del(Z_ARRVAL_P(return_value), p->h);
} else {
- zend_hash_del(Z_ARRVAL_P(return_value), p->key);
+ zend_hash_del(Z_ARRVAL_P(return_value), p->key);
}
}
pefree(arTmp, Z_ARRVAL_P(array)->u.flags & HASH_FLAG_PERSISTENT);