Skip to content

Commit 1043c51

Browse files
shivammathurgithub-actions[bot]
authored andcommitted
Add support for ICU 70.1
1 parent d4b0872 commit 1043c51

File tree

5 files changed

+380
-4
lines changed

5 files changed

+380
-4
lines changed

ext/intl/breakiterator/codepointiterator_internal.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
7272
clearCurrentCharIter();
7373
}
7474

75+
#if U_ICU_VERSION_MAJOR_NUM >= 70
76+
bool CodePointBreakIterator::operator==(const BreakIterator& that) const
77+
#else
7578
UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
79+
#endif
7680
{
7781
if (typeid(*this) != typeid(that)) {
7882
return FALSE;

ext/intl/breakiterator/codepointiterator_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ namespace PHP {
3636

3737
virtual ~CodePointBreakIterator();
3838

39+
#if U_ICU_VERSION_MAJOR_NUM >= 70
40+
virtual bool operator==(const BreakIterator& that) const;
41+
#else
3942
virtual UBool operator==(const BreakIterator& that) const;
43+
#endif
4044

4145
virtual CodePointBreakIterator* clone(void) const;
4246

ext/intl/locale/locale_methods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ PHP_FUNCTION(locale_filter_matches)
13241324
if( token && (token==cur_lang_tag) ){
13251325
/* check if the char. after match is SEPARATOR */
13261326
chrcheck = token + (strlen(cur_loc_range));
1327-
if( isIDSeparator(*chrcheck) || isEndOfTag(*chrcheck) ){
1327+
if( isIDSeparator(*chrcheck) || isKeywordSeparator(*chrcheck) || isEndOfTag(*chrcheck) ){
13281328
if( cur_lang_tag){
13291329
efree( cur_lang_tag );
13301330
}

ext/intl/tests/locale_filter_matches.phpt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
--TEST--
2-
locale_filter_matches.phpt() icu <= 4.2
2+
locale_filter_matches.phpt() for ICU >= 67.1 and < 70.1
3+
--EXTENSIONS--
4+
intl
35
--SKIPIF--
4-
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5-
<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
6+
<?php if (version_compare(INTL_ICU_VERSION, '67.1') < 0 || version_compare(INTL_ICU_VERSION, '70.1') >= 0) die('skip for ICU >= 67.1 and < 70.1'); ?>
67
--FILE--
78
<?php
89

0 commit comments

Comments
 (0)