Skip to content

Commit 2a70a46

Browse files
committed
Upgrade to ICU 74
1 parent 0b2f641 commit 2a70a46

File tree

654 files changed

+836932
-843284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

654 files changed

+836932
-843284
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ See the following version matrix:
1212
| `FoundationICU` version | `ICU` version |
1313
| --- | --- |
1414
| `0.0.2` and below | `70.1` |
15-
| `0.0.3` and above | `72.1` |
15+
| `0.0.3` ~ `0.0.9` | `72.1` |
16+
| `0.0.10` and above | `74.0` |
1617

1718

1819
## Adding FoundationICU as a Dependency

icuSources/common/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
##===----------------------------------------------------------------------===##
1414

1515
target_include_directories(_FoundationICU PRIVATE .)
16-
1716
target_sources(_FoundationICU
1817
PRIVATE
1918
aaplbfct.cpp
@@ -31,7 +30,6 @@ target_sources(_FoundationICU
3130
chariter.cpp
3231
charstr.cpp
3332
cmemory.cpp
34-
cpputils.h
3533
cstr.cpp
3634
cstring.cpp
3735
cwchar.cpp
@@ -43,9 +41,9 @@ target_sources(_FoundationICU
4341
errorcode.cpp
4442
filteredbrk.cpp
4543
filterednormalizer2.cpp
44+
icu_packaged_data.cpp
4645
icudataver.cpp
4746
icuplug.cpp
48-
icu_packaged_data.cpp
4947
loadednormalizer2impl.cpp
5048
localebuilder.cpp
5149
localematcher.cpp
@@ -65,6 +63,7 @@ target_sources(_FoundationICU
6563
lsr.cpp
6664
lstmbe.cpp
6765
messagepattern.cpp
66+
mlbe.cpp
6867
normalizer2.cpp
6968
normalizer2impl.cpp
7069
normlzr.cpp
@@ -169,6 +168,8 @@ target_sources(_FoundationICU
169168
uloc.cpp
170169
uloc_keytype.cpp
171170
uloc_tag.cpp
171+
ulocale.cpp
172+
ulocbuilder.cpp
172173
ulocdata.cpp
173174
umapfile.cpp
174175
umath.cpp

icuSources/common/appendable.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ Appendable::~Appendable() {}
2525
UBool
2626
Appendable::appendCodePoint(UChar32 c) {
2727
if(c<=0xffff) {
28-
return appendCodeUnit((UChar)c);
28+
return appendCodeUnit((char16_t)c);
2929
} else {
3030
return appendCodeUnit(U16_LEAD(c)) && appendCodeUnit(U16_TRAIL(c));
3131
}
3232
}
3333

3434
UBool
35-
Appendable::appendString(const UChar *s, int32_t length) {
35+
Appendable::appendString(const char16_t *s, int32_t length) {
3636
if(length<0) {
37-
UChar c;
37+
char16_t c;
3838
while((c=*s++)!=0) {
3939
if(!appendCodeUnit(c)) {
4040
return false;
4141
}
4242
}
4343
} else if(length>0) {
44-
const UChar *limit=s+length;
44+
const char16_t *limit=s+length;
4545
do {
4646
if(!appendCodeUnit(*s++)) {
4747
return false;
@@ -56,14 +56,14 @@ Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
5656
return true;
5757
}
5858

59-
UChar *
59+
char16_t *
6060
Appendable::getAppendBuffer(int32_t minCapacity,
6161
int32_t /*desiredCapacityHint*/,
62-
UChar *scratch, int32_t scratchCapacity,
62+
char16_t *scratch, int32_t scratchCapacity,
6363
int32_t *resultCapacity) {
6464
if(minCapacity<1 || scratchCapacity<minCapacity) {
6565
*resultCapacity=0;
66-
return NULL;
66+
return nullptr;
6767
}
6868
*resultCapacity=scratchCapacity;
6969
return scratch;

icuSources/common/bmpset.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ BMPSet::contains(UChar32 c) const {
319319
* Check for sufficient length for trail unit for each surrogate pair.
320320
* Handle single surrogates as surrogate code points as usual in ICU.
321321
*/
322-
const UChar *
323-
BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const {
324-
UChar c, c2;
322+
const char16_t *
323+
BMPSet::span(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const {
324+
char16_t c, c2;
325325

326326
if(spanCondition) {
327327
// span
@@ -408,9 +408,9 @@ BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition
408408
}
409409

410410
/* Symmetrical with span(). */
411-
const UChar *
412-
BMPSet::spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const {
413-
UChar c, c2;
411+
const char16_t *
412+
BMPSet::spanBack(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const {
413+
char16_t c, c2;
414414

415415
if(spanCondition) {
416416
// span

icuSources/common/bmpset.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ class BMPSet : public UMemory {
4848
* It must be s<limit and spanCondition==0 or 1.
4949
* @return The string pointer which limits the span.
5050
*/
51-
const UChar *span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const;
51+
const char16_t *span(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const;
5252

5353
/*
5454
* Span the trailing substring for which each character c has spanCondition==contains(c).
5555
* It must be s<limit and spanCondition==0 or 1.
5656
* @return The string pointer which starts the span.
5757
*/
58-
const UChar *spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const;
58+
const char16_t *spanBack(const char16_t *s, const char16_t *limit, USetSpanCondition spanCondition) const;
5959

6060
/*
6161
* Span the initial substring for which each character c has spanCondition==contains(c).

0 commit comments

Comments
 (0)