summaryrefslogtreecommitdiff
path: root/ext/intl/locale/locale_methods.c
diff options
context:
space:
mode:
authorGustavo Lopes <glopes@safelinq.com>2012-07-23 16:38:27 +0200
committerGustavo Lopes <glopes@safelinq.com>2012-07-23 16:38:27 +0200
commitc052b9c99ac09069d3f7c8ca5904c499ec842336 (patch)
treee584f68eab1bf1369b642e1008af4598647d143b /ext/intl/locale/locale_methods.c
parent0dfcc3e798cd54714f792bf7507c37b96146ee1b (diff)
downloadphp-git-c052b9c99ac09069d3f7c8ca5904c499ec842336.tar.gz
Do not fetch default locale once on minit or rinit
The default locale is now requested to ICU when it's needed by using intl_get_default_locale().
Diffstat (limited to 'ext/intl/locale/locale_methods.c')
-rwxr-xr-xext/intl/locale/locale_methods.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 936e3142ad..d1a86d8ee2 100755
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -390,7 +390,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
/* Call ICU get */
@@ -496,7 +496,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
if( strcmp(tag_name, DISP_NAME) != 0 ){
@@ -518,7 +518,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
/* Check if disp_loc_name passed , if not use default locale */
if( !disp_loc_name){
- disp_loc_name = estrdup(INTL_G(default_locale));
+ disp_loc_name = estrdup(intl_locale_get_default(TSRMLS_C));
free_loc_name = 1;
}
@@ -690,7 +690,7 @@ PHP_FUNCTION( locale_get_keywords )
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
/* Get the keywords */
@@ -1097,7 +1097,7 @@ PHP_FUNCTION(locale_parse)
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
array_init( return_value );
@@ -1145,7 +1145,7 @@ PHP_FUNCTION(locale_get_all_variants)
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
@@ -1251,7 +1251,7 @@ PHP_FUNCTION(locale_filter_matches)
}
if(loc_range_len == 0) {
- loc_range = INTL_G(default_locale);
+ loc_range = intl_locale_get_default(TSRMLS_C);
}
if( strcmp(loc_range,"*")==0){
@@ -1537,7 +1537,7 @@ PHP_FUNCTION(locale_lookup)
}
if(loc_range_len == 0) {
- loc_range = INTL_G(default_locale);
+ loc_range = intl_locale_get_default(TSRMLS_C);
}
hash_arr = HASH_OF(arr);