Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7547e79

Browse filesBrowse files
deps: update icu to 78.3
PR-URL: #62324 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent b2c5235 commit 7547e79
Copy full SHA for 7547e79

5 files changed

+30-17Lines changed: 30 additions & 17 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/icu-small/source/common/unicode/utfiterator.h‎

Copy file name to clipboardExpand all lines: deps/icu-small/source/common/unicode/utfiterator.h
+19-11Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,11 @@ class UTFImpl<
557557
public:
558558
// Handle ill-formed UTF-8
559559
U_FORCE_INLINE static CP32 sub() {
560-
switch (behavior) {
561-
case UTF_BEHAVIOR_NEGATIVE: return U_SENTINEL;
562-
case UTF_BEHAVIOR_FFFD: return 0xfffd;
560+
if constexpr (behavior == UTF_BEHAVIOR_NEGATIVE) {
561+
return U_SENTINEL;
562+
} else {
563+
static_assert(behavior == UTF_BEHAVIOR_FFFD);
564+
return 0xfffd;
563565
}
564566
}
565567

@@ -736,10 +738,13 @@ class UTFImpl<
736738
public:
737739
// Handle ill-formed UTF-16: One unpaired surrogate.
738740
U_FORCE_INLINE static CP32 sub(CP32 surrogate) {
739-
switch (behavior) {
740-
case UTF_BEHAVIOR_NEGATIVE: return U_SENTINEL;
741-
case UTF_BEHAVIOR_FFFD: return 0xfffd;
742-
case UTF_BEHAVIOR_SURROGATE: return surrogate;
741+
if constexpr (behavior == UTF_BEHAVIOR_NEGATIVE) {
742+
return U_SENTINEL;
743+
} else if constexpr (behavior == UTF_BEHAVIOR_FFFD) {
744+
return 0xfffd;
745+
} else {
746+
static_assert(behavior == UTF_BEHAVIOR_SURROGATE);
747+
return surrogate;
743748
}
744749
}
745750

@@ -822,10 +827,13 @@ class UTFImpl<
822827
public:
823828
// Handle ill-formed UTF-32
824829
U_FORCE_INLINE static CP32 sub(bool forSurrogate, CP32 surrogate) {
825-
switch (behavior) {
826-
case UTF_BEHAVIOR_NEGATIVE: return U_SENTINEL;
827-
case UTF_BEHAVIOR_FFFD: return 0xfffd;
828-
case UTF_BEHAVIOR_SURROGATE: return forSurrogate ? surrogate : 0xfffd;
830+
if constexpr (behavior == UTF_BEHAVIOR_NEGATIVE) {
831+
return U_SENTINEL;
832+
} else if constexpr (behavior == UTF_BEHAVIOR_FFFD) {
833+
return 0xfffd;
834+
} else {
835+
static_assert(behavior == UTF_BEHAVIOR_SURROGATE);
836+
return forSurrogate ? surrogate : 0xfffd;
829837
}
830838
}
831839

Collapse file

‎deps/icu-small/source/common/unicode/uvernum.h‎

Copy file name to clipboardExpand all lines: deps/icu-small/source/common/unicode/uvernum.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
* This value will change in the subsequent releases of ICU
6060
* @stable ICU 2.6
6161
*/
62-
#define U_ICU_VERSION_MINOR_NUM 2
62+
#define U_ICU_VERSION_MINOR_NUM 3
6363

6464
/** The current ICU patchlevel version as an integer.
6565
* This value will change in the subsequent releases of ICU
@@ -132,7 +132,7 @@
132132
* This value will change in the subsequent releases of ICU
133133
* @stable ICU 2.4
134134
*/
135-
#define U_ICU_VERSION "78.2"
135+
#define U_ICU_VERSION "78.3"
136136

137137
/**
138138
* The current ICU library major version number as a string, for library name suffixes.
@@ -151,7 +151,7 @@
151151
/** Data version in ICU4C.
152152
* @internal ICU 4.4 Internal Use Only
153153
**/
154-
#define U_ICU_DATA_VERSION "78.2"
154+
#define U_ICU_DATA_VERSION "78.3"
155155
#endif /* U_HIDE_INTERNAL_API */
156156

157157
/*===========================================================================
Collapse file
-3.18 KB
Binary file not shown.
Collapse file

‎deps/icu-small/source/i18n/nfrule.cpp‎

Copy file name to clipboardExpand all lines: deps/icu-small/source/i18n/nfrule.cpp
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,17 @@ NFRule::makeRules(UnicodeString& description,
158158
UnicodeString sbuf;
159159
int32_t orElseOp = description.indexOf(gVerticalLine);
160160

161+
uint64_t mod = util64_pow(rule1->radix, rule1->exponent);
161162
// we'll actually only split the rule into two rules if its
162163
// base value is an even multiple of its divisor (or it's one
163164
// of the special rules)
165+
if (rule1->baseValue > 0 && rule1->radix != 0 && mod == 0) {
166+
status = U_NUMBER_ARG_OUTOFBOUNDS_ERROR;
167+
return;
168+
}
164169
if ((rule1->baseValue > 0
165170
&& (rule1->radix != 0) // ICU-23109 Ensure next line won't "% 0"
166-
&& (rule1->baseValue % util64_pow(rule1->radix, rule1->exponent)) == 0)
171+
&& (rule1->baseValue % mod == 0))
167172
|| rule1->getType() == kImproperFractionRule
168173
|| rule1->getType() == kDefaultRule) {
169174

Collapse file

‎tools/icu/current_ver.dep‎

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"url": "https://github.com/unicode-org/icu/releases/download/release-78.2/icu4c-78.2-sources.tgz",
4-
"md5": "2bf8db43ccdc837e402ac773f17c7cf8"
3+
"url": "https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz",
4+
"md5": "a7b736b570ef0e180c96a31715a00c78"
55
}
66
]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.