cvs: pecl(PHP_5_2) /intl config.m4 config.w32 php_intl.c php_intl.h
| From: | Ed Batutis | Date: | Fri, 04 Apr 2008 17:15:02 +0000 |
| Subject: | cvs: pecl(PHP_5_2) /intl config.m4 config.w32 php_intl.c php_intl.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10306@lists.php.net to get a copy of this message | ||
ebatutis Fri Apr 4 17:15:02 2008 UTC
Modified files: (Branch: PHP_5_2)
/pecl/intl config.m4 config.w32 php_intl.c php_intl.h
Log:
changes to support grapheme api (moved from pecl/unicode)
http://cvs.php.net/viewvc.cgi/pecl/intl/config.m4?r1=1.1.2.10&r2=1.1.2.11&diff_format=u
Index: pecl/intl/config.m4
diff -u pecl/intl/config.m4:1.1.2.10 pecl/intl/config.m4:1.1.2.11
--- pecl/intl/config.m4:1.1.2.10 Tue Mar 4 23:48:03 2008
+++ pecl/intl/config.m4 Fri Apr 4 17:15:02 2008
@@ -51,6 +51,8 @@
msgformat/msgformat_format.c \
msgformat/msgformat_helpers.cpp \
msgformat/msgformat_parse.c \
+ grapheme/grapheme_string.c \
+ grapheme/grapheme_util.c \
,$ext_shared,,$ICU_INCS)
PHP_ADD_BUILD_DIR($ext_builddir/collator)
@@ -60,4 +62,5 @@
PHP_ADD_BUILD_DIR($ext_builddir/dateformat)
PHP_ADD_BUILD_DIR($ext_builddir/locale)
PHP_ADD_BUILD_DIR($ext_builddir/msgformat)
+ PHP_ADD_BUILD_DIR($ext_builddir/grapheme)
fi
http://cvs.php.net/viewvc.cgi/pecl/intl/config.w32?r1=1.1.2.9&r2=1.1.2.10&diff_format=u
Index: pecl/intl/config.w32
diff -u pecl/intl/config.w32:1.1.2.9 pecl/intl/config.w32:1.1.2.10
--- pecl/intl/config.w32:1.1.2.9 Tue Mar 4 23:48:03 2008
+++ pecl/intl/config.w32 Fri Apr 4 17:15:02 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.1.2.9 2008/03/04 23:48:03 kirtig Exp $
+// $Id: config.w32,v 1.1.2.10 2008/04/04 17:15:02 ebatutis Exp $
// vim:ft=javascript
ARG_ENABLE("intl", "Enable internationalization support", "no");
@@ -47,6 +47,9 @@
msgformat_helpers.cpp \
msgformat_parse.c \
", "intl");
+ ADD_SOURCES(configure_module_dirname + "/grapheme", "\
+ grapheme_string.c grapheme_util.c \
+ ", "intl");
ADD_SOURCES(configure_module_dirname + "/normalizer", "\
normalizer.c \
normalizer_class.c \
http://cvs.php.net/viewvc.cgi/pecl/intl/php_intl.c?r1=1.1.2.24&r2=1.1.2.25&diff_format=u
Index: pecl/intl/php_intl.c
diff -u pecl/intl/php_intl.c:1.1.2.24 pecl/intl/php_intl.c:1.1.2.25
--- pecl/intl/php_intl.c:1.1.2.24 Fri Mar 21 18:15:47 2008
+++ pecl/intl/php_intl.c Fri Apr 4 17:15:02 2008
@@ -176,6 +176,28 @@
ZEND_ARG_INFO( 0, arg3 )
ZEND_END_ARG_INFO()
+static
+ZEND_BEGIN_ARG_INFO_EX( grapheme_0_args, 0, 0, 0 )
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX( grapheme_1_arg, 0, 0, 1 )
+ ZEND_ARG_INFO( 0, arg1 )
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX( grapheme_2_args, 0, 0, 2 )
+ ZEND_ARG_INFO( 0, arg1 )
+ ZEND_ARG_INFO( 0, arg2 )
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX( grapheme_3_args, 0, 0, 3 )
+ ZEND_ARG_INFO( 0, arg1 )
+ ZEND_ARG_INFO( 0, arg2 )
+ ZEND_ARG_INFO( 0, arg3 )
+ZEND_END_ARG_INFO()
+
/* }}} */
/* {{{ intl_functions
@@ -270,6 +292,18 @@
PHP_FE( datefmt_get_error_code, NULL )
PHP_FE( datefmt_get_error_message, NULL )
+ // grapheme functions
+ PHP_FE( grapheme_strlen, grapheme_1_arg )
+ PHP_FE( grapheme_strpos, grapheme_3_args )
+ PHP_FE( grapheme_stripos, grapheme_3_args )
+ PHP_FE( grapheme_strrpos, grapheme_3_args )
+ PHP_FE( grapheme_strripos, grapheme_3_args )
+ PHP_FE( grapheme_substr, grapheme_3_args )
+ PHP_FE( grapheme_strstr, grapheme_3_args )
+ PHP_FE( grapheme_stristr, grapheme_3_args )
+ PHP_FE( grapheme_extract, grapheme_3_args )
+ PHP_FE( grapheme_extractB, grapheme_3_args )
+
// common functions
PHP_FE( intl_get_error_code, intl_0_args )
PHP_FE( intl_get_error_message, intl_0_args )
@@ -409,6 +443,11 @@
if(INTL_G(current_collator)) {
INTL_G(current_collator) = NULL;
}
+ if (INTL_G(grapheme_iterator)) {
+ grapheme_close_global_iterator( TSRMLS_C );
+ INTL_G(grapheme_iterator) = NULL;
+ }
+
intl_error_reset( NULL TSRMLS_CC);
return SUCCESS;
}
http://cvs.php.net/viewvc.cgi/pecl/intl/php_intl.h?r1=1.1.2.6&r2=1.1.2.7&diff_format=u
Index: pecl/intl/php_intl.h
diff -u pecl/intl/php_intl.h:1.1.2.6 pecl/intl/php_intl.h:1.1.2.7
--- pecl/intl/php_intl.h:1.1.2.6 Fri Mar 21 18:15:47 2008
+++ pecl/intl/php_intl.h Fri Apr 4 17:15:02 2008
@@ -23,6 +23,7 @@
#include <php.h>
#include "collator/collator_sort.h"
+#include "grapheme/grapheme.h"
#include "intl_error.h"
extern zend_module_entry intl_module_entry;
@@ -42,6 +43,7 @@
zval* current_collator;
char* default_locale;
collator_compare_func_t compare_func;
+ UBreakIterator* grapheme_iterator;
intl_error g_error;
ZEND_END_MODULE_GLOBALS(intl)