com php-src: Change ZPP only if compiled with ICU >= 6 4: ext/intl/locale/locale_methods.c

From: Date: Sat, 01 Jun 2019 00:18:56 +0000
Subject: com php-src: Change ZPP only if compiled with ICU >= 6 4: ext/intl/locale/locale_methods.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106499@lists.php.net to get a copy of this message
Commit: ee153deb1fc91cecb2095ada9bd12683ca801852 Author: Anatol Belski <ab@php.net> Sat, 1 Jun 2019 02:18:56 +0200 Parents: b01d9fdab1c4893fb0793be65292fd20713b40c6 Branches: PHP-7.2 PHP-7.3 PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee153deb1fc91cecb2095ada9bd12683ca801852 Log: Change ZPP only if compiled with ICU >= 64 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 7356132..768ae84 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1554,11 +1554,17 @@ PHP_FUNCTION(locale_lookup) intl_error_reset( NULL ); - if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS!", &arr, &loc_range, &loc_range_len, +#if U_ICU_VERSION_MAJOR_NUM > 63 +# define BANG "!" +#else +# define BANG +#endif + if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS" BANG, &arr, &loc_range, &loc_range_len, &boolCanonical, &fallback_loc_str) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_lookup: unable to parse input params", 0 ); RETURN_FALSE; } +#undef BANG if(loc_range_len == 0) { if(fallback_loc_str) {

« previous php.cvs (#106499) next »