cvs: ZendEngine2 / zend_API.c php-src unicode-progress.txt php-src/ext/standard array.c string.c
| From: | Andrei Zmievski | Date: | Thu, 13 Jul 2006 21:27:48 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c php-src unicode-progress.txt php-src/ext/standard array.c string.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5073@lists.php.net to get a copy of this message | ||
andrei Thu Jul 13 21:27:48 2006 UTC
Modified files:
/php-src unicode-progress.txt
/php-src/ext/standard array.c string.c
/ZendEngine2 zend_API.c
Log:
- Let the caller output a warning instead of having
zend_get_unified_string_type() do it.
- Mark a few more functions are Unicode compatible.
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.13&r2=1.14&diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.13 php-src/unicode-progress.txt:1.14
--- php-src/unicode-progress.txt:1.13 Thu Jul 13 21:08:43 2006
+++ php-src/unicode-progress.txt Thu Jul 13 21:27:48 2006
@@ -49,9 +49,6 @@
array_map()
Params API, FCI cache, test
- array_merge(), array_merge_recursive()
- Test
-
array_multisort()
Add SORT_LOCALE_STRING, test
@@ -107,12 +104,6 @@
Params API
Either port strnatcmp() to support Unicode or maybe use ICU's numeric collation
- range()
- Test
-
- shuffle()
- Test
-
sort(), rsort()
asort(), arsort()
ksort(), krsort()
@@ -126,10 +117,14 @@
array.c
-------
array_chunk()
+ array_merge()
+ array_merge_recursive()
compact()
count()
min()
max()
+ range()
+ shuffle()
string.c
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.351&r2=1.352&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.351 php-src/ext/standard/array.c:1.352
--- php-src/ext/standard/array.c:1.351 Thu Jul 13 21:08:43 2006
+++ php-src/ext/standard/array.c Thu Jul 13 21:27:48 2006
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.351 2006/07/13 21:08:43 andrei Exp $ */
+/* $Id: array.c,v 1.352 2006/07/13 21:27:48 andrei Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1691,7 +1691,7 @@
/* }}} */
-/* {{{ proto array range(mixed low, mixed high[, int step])
+/* {{{ proto array range(mixed low, mixed high[, int step]) U
Create an array containing the range of integers or characters from low to high (inclusive) */
PHP_FUNCTION(range)
{
@@ -1723,6 +1723,7 @@
/* Unify types */
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_P(zlow), Z_TYPE_P(zhigh));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return;
}
convert_to_explicit_type(zlow, str_type);
@@ -1946,7 +1947,7 @@
efree(elems);
}
-/* {{{ proto bool shuffle(array array_arg)
+/* {{{ proto bool shuffle(array array_arg) U
Randomly shuffle the contents of an array */
PHP_FUNCTION(shuffle)
{
@@ -2533,7 +2534,7 @@
}
-/* {{{ proto array array_merge(array arr1, array arr2 [, array ...])
+/* {{{ proto array array_merge(array arr1, array arr2 [, array ...]) U
Merges elements from passed arrays into one array */
PHP_FUNCTION(array_merge)
{
@@ -2542,7 +2543,7 @@
/* }}} */
-/* {{{ proto array array_merge_recursive(array arr1, array arr2 [, array ...])
+/* {{{ proto array array_merge_recursive(array arr1, array arr2 [, array ...]) U
Recursively merges elements from passed arrays into one array */
PHP_FUNCTION(array_merge_recursive)
{
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.549&r2=1.550&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.549 php-src/ext/standard/string.c:1.550
--- php-src/ext/standard/string.c:1.549 Thu Jul 13 17:55:50 2006
+++ php-src/ext/standard/string.c Thu Jul 13 21:27:48 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.549 2006/07/13 17:55:50 tony2001 Exp $ */
+/* $Id: string.c,v 1.550 2006/07/13 21:27:48 andrei Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -2133,6 +2133,7 @@
if (Z_TYPE_P(haystack) != Z_TYPE_P(needle)) {
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_P(haystack), Z_TYPE_P(needle));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return;
}
convert_to_explicit_type(haystack, str_type);
@@ -2441,6 +2442,7 @@
if (Z_TYPE_P(haystack) != Z_TYPE_P(needle)) {
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_P(haystack), Z_TYPE_P(needle));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return;
}
convert_to_explicit_type(haystack, str_type);
@@ -2554,6 +2556,7 @@
if (Z_TYPE_P(zneedle) != Z_TYPE_P(zhaystack)) {
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_P(zhaystack), Z_TYPE_P(zneedle));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return;
}
convert_to_explicit_type(zhaystack, str_type);
@@ -2777,6 +2780,7 @@
if (Z_TYPE_P(needle) != Z_TYPE_P(haystack)) {
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_P(haystack), Z_TYPE_P(needle));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return;
}
convert_to_explicit_type(haystack, str_type);
@@ -3144,6 +3148,7 @@
if (tmp_repl && Z_TYPE_PP(str) != Z_TYPE_PP(tmp_repl)) {
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_PP(str), Z_TYPE_PP(tmp_repl));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode types");
return;
}
convert_to_explicit_type_ex(str, str_type);
@@ -3221,6 +3226,7 @@
if (tmp_repl && Z_TYPE_PP(tmp_str) != Z_TYPE_PP(tmp_repl)) {
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_PP(tmp_str), Z_TYPE_PP(tmp_repl));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode types");
return;
}
convert_to_explicit_type_ex(tmp_str, str_type);
@@ -4087,6 +4093,7 @@
}
str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_PP(t1), Z_TYPE_PP(t2));
if (str_type == (zend_uchar)-1) {
+ zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return;
}
convert_to_explicit_type_ex(t1, str_type);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.377&r2=1.378&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.377 ZendEngine2/zend_API.c:1.378
--- ZendEngine2/zend_API.c:1.377 Wed Jul 12 10:13:13 2006
+++ ZendEngine2/zend_API.c Thu Jul 13 21:27:48 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.377 2006/07/12 10:13:13 tony2001 Exp $ */
+/* $Id: zend_API.c,v 1.378 2006/07/13 21:27:48 andrei Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -3657,7 +3657,6 @@
/* We do not allow mixing binary and Unicode types */
if (seen_string && seen_unicode) {
- zend_error(E_WARNING, "Cannot mix binary and Unicode parameters");
return (zend_uchar)-1;
}