cvs: pecl /intl config.m4 config.w32 php_intl.c php_intl.h
| From: | Ed Batutis | Date: | Fri, 04 Apr 2008 16:56:45 +0000 |
| Subject: | cvs: pecl /intl config.m4 config.w32 php_intl.c php_intl.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10304@lists.php.net to get a copy of this message | ||
ebatutis Fri Apr 4 16:56:45 2008 UTC
Modified files:
/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.7&r2=1.8&diff_format=u
Index: pecl/intl/config.m4
diff -u pecl/intl/config.m4:1.7 pecl/intl/config.m4:1.8
--- pecl/intl/config.m4:1.7 Thu Dec 20 03:46:57 2007
+++ pecl/intl/config.m4 Fri Apr 4 16:56:45 2008
@@ -44,6 +44,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)
@@ -52,4 +54,5 @@
PHP_ADD_BUILD_DIR($ext_builddir/normalizer)
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.8&r2=1.9&diff_format=u
Index: pecl/intl/config.w32
diff -u pecl/intl/config.w32:1.8 pecl/intl/config.w32:1.9
--- pecl/intl/config.w32:1.8 Thu Dec 20 03:46:57 2007
+++ pecl/intl/config.w32 Fri Apr 4 16:56:45 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.8 2007/12/20 03:46:57 ebatutis Exp $
+// $Id: config.w32,v 1.9 2008/04/04 16:56:45 ebatutis Exp $
// vim:ft=javascript
ARG_ENABLE("intl", "Enable internationalization support", "no");
@@ -52,6 +52,9 @@
normalizer_class.c \
normalizer_normalize.c \
", "intl");
+ ADD_SOURCES(configure_module_dirname + "/grapheme", "\
+ grapheme_string.c grapheme_util.c \
+ ", "intl");
ADD_FLAG("LIBS_INTL", "icudt.lib icuin.lib icuio.lib icule.lib iculx.lib");
// if int32_t and uint32_t types are made available in PHP, uncomment next line
// ADD_FLAG("CFLAGS_INTL", "/D U_HAVE_INT32_T /D U_HAVE_UINT32_T");
http://cvs.php.net/viewvc.cgi/pecl/intl/php_intl.c?r1=1.13&r2=1.14&diff_format=u
Index: pecl/intl/php_intl.c
diff -u pecl/intl/php_intl.c:1.13 pecl/intl/php_intl.c:1.14
--- pecl/intl/php_intl.c:1.13 Fri Mar 21 20:52:16 2008
+++ pecl/intl/php_intl.c Fri Apr 4 16:56:45 2008
@@ -175,6 +175,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[]
@@ -250,6 +272,19 @@
PHP_FE( msgfmt_get_error_code, NULL )
PHP_FE( msgfmt_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 )
@@ -384,6 +419,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.6&r2=1.7&diff_format=u
Index: pecl/intl/php_intl.h
diff -u pecl/intl/php_intl.h:1.6 pecl/intl/php_intl.h:1.7
--- pecl/intl/php_intl.h:1.6 Fri Mar 21 20:52:16 2008
+++ pecl/intl/php_intl.h Fri Apr 4 16:56:45 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)