summaryrefslogtreecommitdiff
path: root/ext/intl/normalizer/normalizer_normalize.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-04-06 21:33:13 +0200
committerAnatol Belski <ab@php.net>2018-04-06 21:33:13 +0200
commit14de058086d76ac344fde67fc343023fc00279a9 (patch)
treeee01d1be783863a44d79faa9e06eeb84d9dfbb64 /ext/intl/normalizer/normalizer_normalize.c
parent39301abbe19973e60ac4dbdb1d98da77fe7dfc52 (diff)
downloadphp-git-14de058086d76ac344fde67fc343023fc00279a9.tar.gz
Rethink conditions
Raise the requirement to ICU 56. Mixing both old and new normalizer APIs would create too much complexity. Therefore go by the recommended ICU version where all the normalizer API became stable. For the older ICU, the deprecated normalizer API is used.
Diffstat (limited to 'ext/intl/normalizer/normalizer_normalize.c')
-rw-r--r--ext/intl/normalizer/normalizer_normalize.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c
index e9431f2372..d5ec912848 100644
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -21,8 +21,7 @@
#include "php_intl.h"
#if U_ICU_VERSION_MAJOR_NUM < 56
#include "unicode/unorm.h"
-#endif
-#if U_ICU_VERSION_MAJOR_NUM >= 49
+#else
#include <unicode/unorm2.h>
#endif
#include "normalizer.h"
@@ -34,7 +33,7 @@
#endif
-#if U_ICU_VERSION_MAJOR_NUM >= 49
+#if U_ICU_VERSION_MAJOR_NUM >= 56
static const UNormalizer2 *intl_get_normalizer(zend_long form, UErrorCode *err)
{/*{{{*/
switch (form)
@@ -345,7 +344,7 @@ PHP_FUNCTION( normalizer_is_normalized )
/* {{{ proto string|null normalizer_get_raw_decomposition( string $input [, string $form = FORM_C] )
* Returns the Decomposition_Mapping property for the given UTF-8 encoded code point.
*/
-#if U_ICU_VERSION_MAJOR_NUM >= 49
+#if U_ICU_VERSION_MAJOR_NUM >= 56
PHP_FUNCTION( normalizer_get_raw_decomposition )
{
char* input = NULL;