]> granicus.if.org Git - php/commitdiff
Remove needless version checks
authorChristoph M. Becker <cmbecker69@gmx.de>
Wed, 1 Aug 2018 15:39:34 +0000 (17:39 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 1 Aug 2018 15:53:38 +0000 (17:53 +0200)
As of PHP 5.5.3, we're requiring ICU ≥ 4.0[1] anyway, so there's no
need to check for ICU 3.x.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=8831b00>

ext/intl/common/common_error.c
ext/intl/formatter/formatter.c

index 16933c587f50ebd0a2aa249a79ac997dcbe314f6..0c0057a8feb25e84bb9f5bc9a8a3f7f20fa17aa0 100644 (file)
@@ -241,9 +241,7 @@ void intl_expose_icu_error_codes( INIT_FUNC_ARGS )
        INTL_EXPOSE_CONST( U_IDNA_VERIFICATION_ERROR );
        INTL_EXPOSE_CONST( U_IDNA_LABEL_TOO_LONG_ERROR );
        INTL_EXPOSE_CONST( U_IDNA_ZERO_LENGTH_LABEL_ERROR );
-#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM >= 8
        INTL_EXPOSE_CONST( U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR );
-#endif
        INTL_EXPOSE_CONST( U_IDNA_ERROR_LIMIT );
 
        /* Aliases for StringPrep */
index 7e0f0df68b0224b46f4bb816dc860b68dd6f1fbf..76db688aebaeed87b2a7535f71317a2db075de80 100644 (file)
 #include "formatter_class.h"
 #include "formatter_format.h"
 
-#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM <= 4
-#define UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL 17
-#endif
-
 /* {{{ formatter_register_constants
  * Register constants common for the both (OO and procedural)
  * APIs.
@@ -58,11 +54,6 @@ void formatter_register_constants( INIT_FUNC_ARGS )
 
        FORMATTER_EXPOSE_CUSTOM_CLASS_CONST( "DEFAULT_STYLE",  UNUM_DEFAULT );
 
-/* workaround for ICU bug */
-#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM < 8
-#define UNUM_ROUND_HALFEVEN UNUM_FOUND_HALFEVEN
-#endif
-
        /* UNumberFormatRoundingMode */
        FORMATTER_EXPOSE_CLASS_CONST( ROUND_CEILING );
        FORMATTER_EXPOSE_CLASS_CONST( ROUND_FLOOR );