diff options
author | Johannes Schlüter <johannes@php.net> | 2012-06-26 12:34:36 +0200 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2012-06-26 12:34:36 +0200 |
commit | 02d8e8959b855e72b4d5cafc71666a1bbe3de672 (patch) | |
tree | 32a6bf2660e9740f911e7fb4012e988de3825e84 /ext/intl/php_intl.c | |
parent | d6e421f6a614ee90893469390f08cfe030f646a7 (diff) | |
parent | 88cf472b92107ab021cb7074de58757bd0cdbf28 (diff) | |
download | php-git-02d8e8959b855e72b4d5cafc71666a1bbe3de672.tar.gz |
Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src: (22 commits)
Fix bug #62373 (serialize() generates wrong reference to the object)
Update UPGRADING given 7596445
Fix typo in error message
BreakIterator: fix compat with old ICU versions
Fix build error one ext/intl
Duplicate test for ICU 49
Fix undeclared intl_locale_get_default()
Fix memory allocation checks for base64 encode
Improve json_encode error handling
- BFN
- BFN
- Improved fix for #62384
BreakIterator::getPartsIterator: new optional arg
Added IntlCodePointBreakIterator.
Add Intl prefix to BreakIterator/RuleBasedBI
Remove trailing space
Replaced zend_parse_method_params with plain zpp
BreakIter: Removed getAvailableLocales/getHashCode
Change in BreakIterator::getPartsIterator()
BreakIterator: add rules status constants
...
Diffstat (limited to 'ext/intl/php_intl.c')
-rwxr-xr-x | ext/intl/php_intl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 59272db712..19896a7108 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -78,6 +78,9 @@ #include "calendar/calendar_methods.h" #include "calendar/gregoriancalendar_methods.h" +#include "breakiterator/breakiterator_class.h" +#include "breakiterator/breakiterator_iterators.h" + #include "idn/idn.h" #if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2 @@ -109,6 +112,14 @@ ZEND_DECLARE_MODULE_GLOBALS( intl ) +const char *intl_locale_get_default( TSRMLS_D ) +{ + if( INTL_G(default_locale) == NULL ) { + return uloc_getDefault(); + } + return INTL_G(default_locale); +} + /* {{{ Arguments info */ ZEND_BEGIN_ARG_INFO_EX(collator_static_0_args, 0, 0, 0) ZEND_END_ARG_INFO() @@ -958,6 +969,12 @@ PHP_MINIT_FUNCTION( intl ) /* Register 'IntlIterator' PHP class */ intl_register_IntlIterator_class( TSRMLS_C ); + /* Register 'BreakIterator' class */ + breakiterator_register_BreakIterator_class( TSRMLS_C ); + + /* Register 'IntlPartsIterator' class */ + breakiterator_register_IntlPartsIterator_class( TSRMLS_C ); + /* Global error handling. */ intl_error_init( NULL TSRMLS_CC ); |