diff options
author | Anatol Belski <ab@php.net> | 2016-10-12 13:28:23 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-10-13 00:31:18 +0200 |
commit | 9557f711d475a9f99509c7d5eb792a56b833aa25 (patch) | |
tree | 4cfde2dcf3285886b89a27d0c72732d9509ce194 | |
parent | 142a94516e5cd94cf9056e15f90ab0552747fc0a (diff) | |
download | php-git-9557f711d475a9f99509c7d5eb792a56b833aa25.tar.gz |
avoid strlen
(cherry picked from commit aaa5d07365b54f35ba3b5024492450f3d2fe4ee5)
-rw-r--r-- | ext/intl/locale/locale_methods.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index e2caacf9e9..eaf113a97e 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -407,7 +407,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) loc_name = intl_locale_get_default(); } - INTL_CHECK_LOCALE_LEN(strlen(loc_name)); + INTL_CHECK_LOCALE_LEN(loc_name_len); /* Call ICU get */ tag_value = get_icu_value_internal( loc_name , tag_name , &result ,0); @@ -1171,7 +1171,7 @@ PHP_FUNCTION(locale_get_all_variants) loc_name = intl_locale_get_default(); } - INTL_CHECK_LOCALE_LEN(strlen(loc_name)); + INTL_CHECK_LOCALE_LEN(loc_name_len); array_init( return_value ); @@ -1280,8 +1280,8 @@ PHP_FUNCTION(locale_filter_matches) RETURN_TRUE; } - INTL_CHECK_LOCALE_LEN(strlen(loc_range)); - INTL_CHECK_LOCALE_LEN(strlen(lang_tag)); + INTL_CHECK_LOCALE_LEN(loc_range_len); + INTL_CHECK_LOCALE_LEN(lang_tag_len); if( boolCanonical ){ /* canonicalize loc_range */ @@ -1564,7 +1564,7 @@ PHP_FUNCTION(locale_lookup) hash_arr = Z_ARRVAL_P(arr); - INTL_CHECK_LOCALE_LEN(strlen(loc_range)); + INTL_CHECK_LOCALE_LEN(loc_range_len); if( !hash_arr || zend_hash_num_elements( hash_arr ) == 0 ) { RETURN_EMPTY_STRING(); |