cvs: /php4/ext/standard string.c
| From: | Thies C. Arntzen | Date: | Sun, 14 Nov 1999 15:35:21 +0000 |
| Subject: | cvs: /php4/ext/standard string.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6216@lists.php.net to get a copy of this message | ||
thies Sun Nov 14 10:35:21 1999 EDT
Modified files:
/php4/ext/standard string.c
Log:
(PHP strtr) no longer modifies arg1.
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.53 php4/ext/standard/string.c:1.54
--- php4/ext/standard/string.c:1.53 Wed Oct 27 18:06:05 1999
+++ php4/ext/standard/string.c Sun Nov 14 10:34:50 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.53 1999/10/27 22:06:05 andrei Exp $ */
+/* $Id: string.c,v 1.54 1999/11/14 15:34:50 thies Exp $ */
/* Synced with php3 revision 1.193 1999-06-16 [ssb] */
@@ -1008,12 +1008,13 @@
convert_to_string_ex(from);
convert_to_string_ex(to);
- RETVAL_STRING(php_strtr((*str)->value.str.val,
- (*str)->value.str.len,
- (*from)->value.str.val,
- (*to)->value.str.val,
- MIN((*from)->value.str.len,(*to)->value.str.len)),
- 1);
+ *return_value=**str;
+ zval_copy_ctor(return_value);
+ php_strtr(return_value->value.str.val,
+ return_value->value.str.len,
+ (*from)->value.str.val,
+ (*to)->value.str.val,
+ MIN((*from)->value.str.len,(*to)->value.str.len));
}
/* }}} */