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().
This commit is contained in:
Gustavo Lopes 2012-07-23 16:38:27 +02:00
parent 0dfcc3e798
commit c052b9c99a
8 changed files with 15 additions and 24 deletions

View file

@ -40,7 +40,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
{
zval *object;
char *locale_str;
const char *locale_str;
int locale_len = 0;
Locale locale;
long date_type = 0;
@ -72,7 +72,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
if (locale_len == 0) {
locale_str = INTL_G(default_locale);
locale_str = intl_locale_get_default(TSRMLS_C);
}
locale = Locale::createFromName(locale_str);