iliaa Wed Nov 26 20:08:47 2003 EDT
Modified files:
/php-src/ext/standard string.c
Log:
Removed dead code.
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.400 php-src/ext/standard/string.c:1.401
--- php-src/ext/standard/string.c:1.400 Wed Oct 29 19:49:33 2003
+++ php-src/ext/standard/string.c Wed Nov 26 20:08:42 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.400 2003/10/30 00:49:33 iliaa Exp $ */
+/* $Id: string.c,v 1.401 2003/11/27 01:08:42 iliaa Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -862,7 +862,6 @@
{
zval **arg1 = NULL, **arg2 = NULL, *delim, *arr;
int argc = ZEND_NUM_ARGS();
- int arg1_separated = 0, arg2_separated = 0, delim_needs_dtor = 0;
if (argc < 1 || argc > 2 ||
zend_get_parameters_ex(argc, &arg1, &arg2) == FAILURE) {
@@ -880,19 +879,15 @@
ZVAL_STRINGL(delim, _IMPL_EMPTY, sizeof(_IMPL_EMPTY) - 1, 0);
SEPARATE_ZVAL(arg1);
- arg1_separated = 1;
- delim_needs_dtor = 1;
arr = *arg1;
} else {
if (Z_TYPE_PP(arg1) == IS_ARRAY) {
SEPARATE_ZVAL(arg1);
- arg1_separated = 1;
arr = *arg1;
convert_to_string_ex(arg2);
delim = *arg2;
} else if (Z_TYPE_PP(arg2) == IS_ARRAY) {
SEPARATE_ZVAL(arg2);
- arg2_separated = 1;
arr = *arg2;
convert_to_string_ex(arg1);
delim = *arg1;
@@ -904,13 +899,7 @@
php_implode(delim, arr, return_value);
- if (arg1 != NULL && arg1_separated) {
- zval_ptr_dtor(arg1);
- }
- if (arg2 != NULL && arg2_separated) {
- zval_ptr_dtor(arg2);
- }
- if (delim_needs_dtor) {
+ if (argc == 1) {
FREE_ZVAL(delim);
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php