tony2001 Thu Jul 13 12:34:30 2006 UTC
Modified files:
/php-src/ext/reflection php_reflection.c
Log:
Unicode support in ReflectionParameter::__construct()
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.242&r2=1.243&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.242
php-src/ext/reflection/php_reflection.c:1.243
--- php-src/ext/reflection/php_reflection.c:1.242 Mon Jul 10 00:13:50 2006
+++ php-src/ext/reflection/php_reflection.c Thu Jul 13 12:34:30 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_reflection.c,v 1.242 2006/07/10 00:13:50 helly Exp $ */
+/* $Id: php_reflection.c,v 1.243 2006/07/13 12:34:30 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1866,10 +1866,12 @@
zend_uint i;
position= -1;
- convert_to_string_ex(¶meter);
+ convert_to_text_ex(¶meter);
for (i = 0; i < fptr->common.num_args; i++) {
- /* FIXME: Unicode support??? */
- if (arg_info[i].name.s && strcmp(arg_info[i].name.s,
Z_STRVAL_P(parameter)) == 0) {
+ if (Z_TYPE_P(parameter) == IS_STRING &&
arg_info[i].name.s && strcmp(arg_info[i].name.s, Z_STRVAL_P(parameter)) == 0) {
+ position= i;
+ break;
+ } else if (Z_TYPE_P(parameter) == IS_UNICODE &&
arg_info[i].name.u && u_strcmp(arg_info[i].name.u, Z_USTRVAL_P(parameter)) ==
0) {
position= i;
break;
}
@@ -4836,7 +4838,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
- php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.242
2006/07/10 00:13:50 helly Exp $");
+ php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.243
2006/07/13 12:34:30 tony2001 Exp $");
php_info_print_table_end();
} /* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php