andrei Tue Aug 1 22:28:26 2006 UTC
Modified files:
/php-src unicode-progress.txt
/php-src/ext/standard array.c
Log:
Add SORT_LOCALE_STRING support to array_multisort() and mark it with U.
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.31&r2=1.32&diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.31 php-src/unicode-progress.txt:1.32
--- php-src/unicode-progress.txt:1.31 Tue Aug 1 21:50:44 2006
+++ php-src/unicode-progress.txt Tue Aug 1 22:28:25 2006
@@ -10,9 +10,6 @@
Need to fix string_compare_function() to compare Unicode strings
directly in code point order
- array_multisort()
- Add SORT_LOCALE_STRING, test
-
natsort(), natcasesort()
Params API
Either port strnatcmp() to support Unicode or maybe use ICU's numeric
collation
@@ -35,6 +32,7 @@
array_map()
array_merge()
array_merge_recursive()
+ array_multisort()
array_product()
array_push(), array_pop(), array_shift(), array_unshift()
array_pad()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.376&r2=1.377&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.376 php-src/ext/standard/array.c:1.377
--- php-src/ext/standard/array.c:1.376 Tue Aug 1 21:50:44 2006
+++ php-src/ext/standard/array.c Tue Aug 1 22:28:26 2006
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.376 2006/08/01 21:50:44 andrei Exp $ */
+/* $Id: array.c,v 1.377 2006/08/01 22:28:26 andrei Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -3693,7 +3693,7 @@
efree(args); \
RETURN_FALSE;
-/* {{{ proto bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [,
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [,
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])
+/* {{{ proto bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [,
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [,
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...]) U
Sort multiple arrays at once similar to how ORDER BY clause works in SQL */
PHP_FUNCTION(array_multisort)
{
@@ -3770,6 +3770,7 @@
case SORT_REGULAR:
case SORT_NUMERIC:
case SORT_STRING:
+ case SORT_LOCALE_STRING:
/* flag allowed here */
if (parse_state[MULTISORT_TYPE] == 1) {
/* Save the flag and make sure
then next arg is not the current flag. */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php