Skip to content

Commit 1f9b181

Browse files
authored
deps: update ICU to 72.1
Refs: https://github.com/unicode-org/icu/releases/tag/release-72-1 PR-URL: #45068 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 67828d5 commit 1f9b181

File tree

497 files changed

+14841
-11304
lines changed

Some content is hidden

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

497 files changed

+14841
-11304
lines changed

deps/icu-small/README-FULL-ICU.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ICU sources - auto generated by shrink-icu-src.py
22

33
This directory contains the ICU subset used by --with-intl=full-icu
4-
It is a strict subset of ICU 71 source files with the following exception(s):
5-
* deps/icu-small/source/data/in/icudt71l.dat.bz2 : compressed data file
4+
It is a strict subset of ICU 72 source files with the following exception(s):
5+
* deps/icu-small/source/data/in/icudt72l.dat.bz2 : compressed data file
66

77

88
To rebuild this directory, see ../../tools/icu/README.md

deps/icu-small/source/common/appendable.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ Appendable::appendString(const UChar *s, int32_t length) {
3737
UChar c;
3838
while((c=*s++)!=0) {
3939
if(!appendCodeUnit(c)) {
40-
return FALSE;
40+
return false;
4141
}
4242
}
4343
} else if(length>0) {
4444
const UChar *limit=s+length;
4545
do {
4646
if(!appendCodeUnit(*s++)) {
47-
return FALSE;
47+
return false;
4848
}
4949
} while(s<limit);
5050
}
51-
return TRUE;
51+
return true;
5252
}
5353

5454
UBool
5555
Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
56-
return TRUE;
56+
return true;
5757
}
5858

5959
UChar *

deps/icu-small/source/common/bmpset.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ BMPSet::contains(UChar32 c) const {
309309
// surrogate or supplementary code point
310310
return containsSlow(c, list4kStarts[0xd], list4kStarts[0x11]);
311311
} else {
312-
// Out-of-range code points get FALSE, consistent with long-standing
312+
// Out-of-range code points get false, consistent with long-standing
313313
// behavior of UnicodeSet::contains(c).
314-
return FALSE;
314+
return false;
315315
}
316316
}
317317

deps/icu-small/source/common/brkeng.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) {
261261
const UChar *extStart = u_memrchr(dictfname, 0x002e, dictnlength); // last dot
262262
if (extStart != NULL) {
263263
int32_t len = (int32_t)(extStart - dictfname);
264-
ext.appendInvariantChars(UnicodeString(FALSE, extStart + 1, dictnlength - len - 1), status);
264+
ext.appendInvariantChars(UnicodeString(false, extStart + 1, dictnlength - len - 1), status);
265265
dictnlength = len;
266266
}
267-
dictnbuf.appendInvariantChars(UnicodeString(FALSE, dictfname, dictnlength), status);
267+
dictnbuf.appendInvariantChars(UnicodeString(false, dictfname, dictnlength), status);
268268
ures_close(b);
269269

270270
UDataMemory *file = udata_open(U_ICUDATA_BRKITR, ext.data(), dictnbuf.data(), &status);

deps/icu-small/source/common/brkiter.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
279279
// defined in ucln_cmn.h
280280
U_NAMESPACE_END
281281

282-
static icu::UInitOnce gInitOnceBrkiter = U_INITONCE_INITIALIZER;
282+
static icu::UInitOnce gInitOnceBrkiter {};
283283
static icu::ICULocaleService* gService = NULL;
284284

285285

@@ -296,7 +296,7 @@ static UBool U_CALLCONV breakiterator_cleanup(void) {
296296
}
297297
gInitOnceBrkiter.reset();
298298
#endif
299-
return TRUE;
299+
return true;
300300
}
301301
U_CDECL_END
302302
U_NAMESPACE_BEGIN
@@ -347,7 +347,7 @@ BreakIterator::unregister(URegistryKey key, UErrorCode& status)
347347
}
348348
status = U_MEMORY_ALLOCATION_ERROR;
349349
}
350-
return FALSE;
350+
return false;
351351
}
352352

353353
// -------------------------------------

deps/icu-small/source/common/bytesinkutil.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN
2020
UBool
2121
ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Length,
2222
ByteSink &sink, Edits *edits, UErrorCode &errorCode) {
23-
if (U_FAILURE(errorCode)) { return FALSE; }
23+
if (U_FAILURE(errorCode)) { return false; }
2424
char scratch[200];
2525
int32_t s8Length = 0;
2626
for (int32_t i = 0; i < s16Length;) {
@@ -44,25 +44,25 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt
4444
}
4545
if (j > (INT32_MAX - s8Length)) {
4646
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
47-
return FALSE;
47+
return false;
4848
}
4949
sink.Append(buffer, j);
5050
s8Length += j;
5151
}
5252
if (edits != nullptr) {
5353
edits->addReplace(length, s8Length);
5454
}
55-
return TRUE;
55+
return true;
5656
}
5757

5858
UBool
5959
ByteSinkUtil::appendChange(const uint8_t *s, const uint8_t *limit,
6060
const char16_t *s16, int32_t s16Length,
6161
ByteSink &sink, Edits *edits, UErrorCode &errorCode) {
62-
if (U_FAILURE(errorCode)) { return FALSE; }
62+
if (U_FAILURE(errorCode)) { return false; }
6363
if ((limit - s) > INT32_MAX) {
6464
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
65-
return FALSE;
65+
return false;
6666
}
6767
return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode);
6868
}
@@ -109,16 +109,16 @@ UBool
109109
ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit,
110110
ByteSink &sink, uint32_t options, Edits *edits,
111111
UErrorCode &errorCode) {
112-
if (U_FAILURE(errorCode)) { return FALSE; }
112+
if (U_FAILURE(errorCode)) { return false; }
113113
if ((limit - s) > INT32_MAX) {
114114
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
115-
return FALSE;
115+
return false;
116116
}
117117
int32_t length = (int32_t)(limit - s);
118118
if (length > 0) {
119119
appendNonEmptyUnchanged(s, length, sink, options, edits);
120120
}
121-
return TRUE;
121+
return true;
122122
}
123123

124124
CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) {

deps/icu-small/source/common/bytesinkutil.h

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// bytesinkutil.h
55
// created: 2017sep14 Markus W. Scherer
66

7+
#ifndef BYTESINKUTIL_H
8+
#define BYTESINKUTIL_H
9+
710
#include "unicode/utypes.h"
811
#include "unicode/bytestream.h"
912
#include "unicode/edits.h"
@@ -81,3 +84,5 @@ class U_COMMON_API CharStringByteSink : public ByteSink {
8184
};
8285

8386
U_NAMESPACE_END
87+
88+
#endif //BYTESINKUTIL_H

deps/icu-small/source/common/bytestream.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ void ByteSink::Flush() {}
3030

3131
CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity)
3232
: outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity),
33-
size_(0), appended_(0), overflowed_(FALSE) {
33+
size_(0), appended_(0), overflowed_(false) {
3434
}
3535

3636
CheckedArrayByteSink::~CheckedArrayByteSink() {}
3737

3838
CheckedArrayByteSink& CheckedArrayByteSink::Reset() {
3939
size_ = appended_ = 0;
40-
overflowed_ = FALSE;
40+
overflowed_ = false;
4141
return *this;
4242
}
4343

@@ -48,14 +48,14 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) {
4848
if (n > (INT32_MAX - appended_)) {
4949
// TODO: Report as integer overflow, not merely buffer overflow.
5050
appended_ = INT32_MAX;
51-
overflowed_ = TRUE;
51+
overflowed_ = true;
5252
return;
5353
}
5454
appended_ += n;
5555
int32_t available = capacity_ - size_;
5656
if (n > available) {
5757
n = available;
58-
overflowed_ = TRUE;
58+
overflowed_ = true;
5959
}
6060
if (n > 0 && bytes != (outbuf_ + size_)) {
6161
uprv_memcpy(outbuf_ + size_, bytes, n);

deps/icu-small/source/common/bytestrie.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length,
337337
}
338338
} else {
339339
uniqueValue=value;
340-
haveUniqueValue=TRUE;
340+
haveUniqueValue=true;
341341
}
342342
} else {
343343
if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) {
344344
return NULL;
345345
}
346-
haveUniqueValue=TRUE;
346+
haveUniqueValue=true;
347347
}
348348
} while(--length>1);
349349
return pos+1; // ignore the last comparison byte
@@ -359,9 +359,9 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
359359
}
360360
pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue);
361361
if(pos==NULL) {
362-
return FALSE;
362+
return false;
363363
}
364-
haveUniqueValue=TRUE;
364+
haveUniqueValue=true;
365365
} else if(node<kMinValueLead) {
366366
// linear-match node
367367
pos+=node-kMinLinearMatch+1; // Ignore the match bytes.
@@ -370,14 +370,14 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
370370
int32_t value=readValue(pos, node>>1);
371371
if(haveUniqueValue) {
372372
if(value!=uniqueValue) {
373-
return FALSE;
373+
return false;
374374
}
375375
} else {
376376
uniqueValue=value;
377-
haveUniqueValue=TRUE;
377+
haveUniqueValue=true;
378378
}
379379
if(isFinal) {
380-
return TRUE;
380+
return true;
381381
}
382382
pos=skipValue(pos, node);
383383
}

deps/icu-small/source/common/bytestriebuilder.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
231231
}
232232
uprv_sortArray(elements, elementsLength, (int32_t)sizeof(BytesTrieElement),
233233
compareElementStrings, strings,
234-
FALSE, // need not be a stable sort
234+
false, // need not be a stable sort
235235
&errorCode);
236236
if(U_FAILURE(errorCode)) {
237237
return;
@@ -375,7 +375,7 @@ BytesTrieBuilder::createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le
375375
UBool
376376
BytesTrieBuilder::ensureCapacity(int32_t length) {
377377
if(bytes==NULL) {
378-
return FALSE; // previous memory allocation had failed
378+
return false; // previous memory allocation had failed
379379
}
380380
if(length>bytesCapacity) {
381381
int32_t newCapacity=bytesCapacity;
@@ -388,15 +388,15 @@ BytesTrieBuilder::ensureCapacity(int32_t length) {
388388
uprv_free(bytes);
389389
bytes=NULL;
390390
bytesCapacity=0;
391-
return FALSE;
391+
return false;
392392
}
393393
uprv_memcpy(newBytes+(newCapacity-bytesLength),
394394
bytes+(bytesCapacity-bytesLength), bytesLength);
395395
uprv_free(bytes);
396396
bytes=newBytes;
397397
bytesCapacity=newCapacity;
398398
}
399-
return TRUE;
399+
return true;
400400
}
401401

402402
int32_t
@@ -463,7 +463,7 @@ int32_t
463463
BytesTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node) {
464464
int32_t offset=write(node);
465465
if(hasValue) {
466-
offset=writeValueAndFinal(value, FALSE);
466+
offset=writeValueAndFinal(value, false);
467467
}
468468
return offset;
469469
}

deps/icu-small/source/common/bytestrieiterator.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ BytesTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty();
101101
UBool
102102
BytesTrie::Iterator::next(UErrorCode &errorCode) {
103103
if(U_FAILURE(errorCode)) {
104-
return FALSE;
104+
return false;
105105
}
106106
const uint8_t *pos=pos_;
107107
if(pos==NULL) {
108108
if(stack_->isEmpty()) {
109-
return FALSE;
109+
return false;
110110
}
111111
// Pop the state off the stack and continue with the next outbound edge of
112112
// the branch node.
@@ -119,7 +119,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
119119
if(length>1) {
120120
pos=branchNext(pos, length, errorCode);
121121
if(pos==NULL) {
122-
return TRUE; // Reached a final value.
122+
return true; // Reached a final value.
123123
}
124124
} else {
125125
str_->append((char)*pos++, errorCode);
@@ -141,7 +141,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
141141
} else {
142142
pos_=skipValue(pos, node);
143143
}
144-
return TRUE;
144+
return true;
145145
}
146146
if(maxLength_>0 && str_->length()==maxLength_) {
147147
return truncateAndStop();
@@ -152,7 +152,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
152152
}
153153
pos=branchNext(pos, node+1, errorCode);
154154
if(pos==NULL) {
155-
return TRUE; // Reached a final value.
155+
return true; // Reached a final value.
156156
}
157157
} else {
158158
// Linear-match node, append length bytes to str_.
@@ -177,7 +177,7 @@ UBool
177177
BytesTrie::Iterator::truncateAndStop() {
178178
pos_=NULL;
179179
value_=-1; // no real value for str
180-
return TRUE;
180+
return true;
181181
}
182182

183183
// Branch node, needs to take the first outbound edge and push state for the rest.

deps/icu-small/source/common/caniter.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ UnicodeString CanonicalIterator::getSource() {
119119
* Resets the iterator so that one can start again from the beginning.
120120
*/
121121
void CanonicalIterator::reset() {
122-
done = FALSE;
122+
done = false;
123123
for (int i = 0; i < current_length; ++i) {
124124
current[i] = 0;
125125
}
@@ -151,7 +151,7 @@ UnicodeString CanonicalIterator::next() {
151151

152152
for (i = current_length - 1; ; --i) {
153153
if (i < 0) {
154-
done = TRUE;
154+
done = true;
155155
break;
156156
}
157157
current[i]++;
@@ -176,7 +176,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st
176176
if(U_FAILURE(status)) {
177177
return;
178178
}
179-
done = FALSE;
179+
done = false;
180180

181181
cleanPieces();
182182

@@ -521,7 +521,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
521521
int32_t decompLen=decompString.length();
522522

523523
// See if it matches the start of segment (at segmentPos)
524-
UBool ok = FALSE;
524+
UBool ok = false;
525525
UChar32 cp;
526526
int32_t decompPos = 0;
527527
UChar32 decompCp;
@@ -537,7 +537,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
537537

538538
if (decompPos == decompLen) { // done, have all decomp characters!
539539
temp.append(segment+i, segLen-i);
540-
ok = TRUE;
540+
ok = true;
541541
break;
542542
}
543543
U16_NEXT(decomp, decompPos, decompLen, decompCp);

0 commit comments

Comments
 (0)