andrei Wed Aug 2 17:36:28 2006 UTC
Modified files:
/ZendEngine2 zend_API.c
Log:
Add '&' modifier (for 's' type) that will apply the specified converter
during conversion of Unicode strings.
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.389&r2=1.390&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.389 ZendEngine2/zend_API.c:1.390
--- ZendEngine2/zend_API.c:1.389 Tue Jul 25 06:50:26 2006
+++ ZendEngine2/zend_API.c Wed Aug 2 17:36:28 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.389 2006/07/25 06:50:26 derick Exp $ */
+/* $Id: zend_API.c,v 1.390 2006/08/02 17:36:28 andrei Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -435,7 +435,16 @@
/* break omitted intentionally
*/
case IS_UNICODE:
- if (c == 'S') {
+ /* handle conversion of Unicode
to binary with a specific converter */
+ if (c == 's' && *spec_walk ==
'&') {
+ UConverter *conv =
va_arg(*va, UConverter *);
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+
convert_to_string_with_converter(*arg, conv);
+ *p = Z_STRVAL_PP(arg);
+ *pl = Z_STRLEN_PP(arg);
+ spec_walk++;
+ break;
+ } else if (c == 'S') {
return "definitely a
binary string";
}
/* fall through */
@@ -862,8 +871,8 @@
min_num_args = max_num_args;
break;
- case '/':
- case '!':
+ case '/': case '!':
+ case '&':
/* Pass */
break;
@@ -948,7 +957,7 @@
break;
case '|': case '!':
- case '/':
+ case '/': case '&':
/* pass */
break;
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|