Skip to content

Commit e5b51cc

Browse files
srl295targos
authored andcommitted
deps: icu 63.1 bump (CLDR 34)
- Full release notes: http://site.icu-project.org/download/63 Fixes: #22344 PR-URL: #23715 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent c20eb4f commit e5b51cc

File tree

260 files changed

+15760
-6131
lines changed

Some content is hidden

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

260 files changed

+15760
-6131
lines changed

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

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

33
This directory contains the ICU subset used by --with-intl=small-icu (the default)
4-
It is a strict subset of ICU 62 source files with the following exception(s):
5-
* deps/icu-small/source/data/in/icudt62l.dat : Reduced-size data file
4+
It is a strict subset of ICU 63 source files with the following exception(s):
5+
* deps/icu-small/source/data/in/icudt63l.dat : Reduced-size data file
66

77

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ void BMPSet::overrideIllegal() {
241241
bmpBlockBits[i]|=bits;
242242
}
243243

244-
mask=~(0x10001<<0xd); // Lead byte 0xED.
244+
mask= static_cast<uint32_t>(~(0x10001<<0xd)); // Lead byte 0xED.
245245
bits=1<<0xd;
246246
for(i=32; i<64; ++i) { // Second half of 4k block.
247247
bmpBlockBits[i]=(bmpBlockBits[i]&mask)|bits;
248248
}
249249
} else {
250-
mask=~(0x10001<<0xd); // Lead byte 0xED.
250+
mask= static_cast<uint32_t>(~(0x10001<<0xd)); // Lead byte 0xED.
251251
for(i=32; i<64; ++i) { // Second half of 4k block.
252252
bmpBlockBits[i]&=mask;
253253
}

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

+38
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "unicode/utf8.h"
1212
#include "unicode/utf16.h"
1313
#include "bytesinkutil.h"
14+
#include "charstr.h"
1415
#include "cmemory.h"
1516
#include "uassert.h"
1617

@@ -120,4 +121,41 @@ ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit,
120121
return TRUE;
121122
}
122123

124+
CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) {
125+
}
126+
127+
CharStringByteSink::~CharStringByteSink() = default;
128+
129+
void
130+
CharStringByteSink::Append(const char* bytes, int32_t n) {
131+
UErrorCode status = U_ZERO_ERROR;
132+
dest_.append(bytes, n, status);
133+
// Any errors are silently ignored.
134+
}
135+
136+
char*
137+
CharStringByteSink::GetAppendBuffer(int32_t min_capacity,
138+
int32_t desired_capacity_hint,
139+
char* scratch,
140+
int32_t scratch_capacity,
141+
int32_t* result_capacity) {
142+
if (min_capacity < 1 || scratch_capacity < min_capacity) {
143+
*result_capacity = 0;
144+
return nullptr;
145+
}
146+
147+
UErrorCode status = U_ZERO_ERROR;
148+
char* result = dest_.getAppendBuffer(
149+
min_capacity,
150+
desired_capacity_hint,
151+
*result_capacity,
152+
status);
153+
if (U_SUCCESS(status)) {
154+
return result;
155+
}
156+
157+
*result_capacity = scratch_capacity;
158+
return scratch;
159+
}
160+
123161
U_NAMESPACE_END

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

+22
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
U_NAMESPACE_BEGIN
1414

1515
class ByteSink;
16+
class CharString;
1617
class Edits;
1718

1819
class U_COMMON_API ByteSinkUtil {
@@ -58,4 +59,25 @@ class U_COMMON_API ByteSinkUtil {
5859
ByteSink &sink, uint32_t options, Edits *edits);
5960
};
6061

62+
class CharStringByteSink : public ByteSink {
63+
public:
64+
CharStringByteSink(CharString* dest);
65+
~CharStringByteSink() override;
66+
67+
CharStringByteSink() = delete;
68+
CharStringByteSink(const CharStringByteSink&) = delete;
69+
CharStringByteSink& operator=(const CharStringByteSink&) = delete;
70+
71+
void Append(const char* bytes, int32_t n) override;
72+
73+
char* GetAppendBuffer(int32_t min_capacity,
74+
int32_t desired_capacity_hint,
75+
char* scratch,
76+
int32_t scratch_capacity,
77+
int32_t* result_capacity) override;
78+
79+
private:
80+
CharString& dest_;
81+
};
82+
6183
U_NAMESPACE_END

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ BytesTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, UChar
339339

340340
BytesTrieBuilder::BTLinearMatchNode::BTLinearMatchNode(const char *bytes, int32_t len, Node *nextNode)
341341
: LinearMatchNode(len, nextNode), s(bytes) {
342-
hash=hash*37+ustr_hashCharsN(bytes, len);
342+
hash=static_cast<int32_t>(
343+
static_cast<uint32_t>(hash)*37u + static_cast<uint32_t>(ustr_hashCharsN(bytes, len)));
343344
}
344345

345346
UBool

0 commit comments

Comments
 (0)