com php-src: avoid strlen: ext/intl/locale/locale_methods.c

From: Date: Wed, 12 Oct 2016 11:28:23 +0000
Subject: com php-src: avoid strlen: ext/intl/locale/locale_methods.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94946@lists.php.net to get a copy of this message
Commit: aaa5d07365b54f35ba3b5024492450f3d2fe4ee5 Author: Anatol Belski <ab@php.net> Wed, 12 Oct 2016 13:28:23 +0200 Parents: b26b02b2df95eaa647ea3f4e7b42bd11eea4ed2c Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aaa5d07365b54f35ba3b5024492450f3d2fe4ee5 Log: avoid strlen Changed paths: M ext/intl/locale/locale_methods.c Diff: diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index e2caacf..eaf113a 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();

« previous php.cvs (#94946) next »