Skip to content

Commit 122ae24

Browse files
srl295targos
authored andcommitted
deps: icu 62.1 bump (Unicode 11, CLDR 33.1)
- Full release notes: http://site.icu-project.org/download/62 Fixes: #21452 PR-URL: #21728 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent dae7130 commit 122ae24

File tree

213 files changed

+22043
-25764
lines changed

Some content is hidden

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

213 files changed

+22043
-25764
lines changed

configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -1185,8 +1185,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
11851185
def configure_intl(o):
11861186
icus = [
11871187
{
1188-
'url': 'https://ssl.icu-project.org/files/icu4c/61.1/icu4c-61_1-src.zip',
1189-
'md5': '780d8524c8a860ed8d8f6fe75cb7ce3f',
1188+
'url': 'https://sourceforge.net/projects/icu/files/ICU4C/62.1/icu4c-62_1-src.zip',
1189+
'md5': '408854f7b9b58311b68fab4b4dfc80be',
11901190
},
11911191
]
11921192
def icu_download(path):

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 61 source files with the following exception(s):
5-
* deps/icu-small/source/data/in/icudt61l.dat : Reduced-size data file
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
66

77

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

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

+12
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323

2424
U_NAMESPACE_BEGIN
2525

26+
CharString::CharString(CharString&& src) U_NOEXCEPT
27+
: buffer(std::move(src.buffer)), len(src.len) {
28+
src.len = 0; // not strictly necessary because we make no guarantees on the source string
29+
}
30+
31+
CharString& CharString::operator=(CharString&& src) U_NOEXCEPT {
32+
buffer = std::move(src.buffer);
33+
len = src.len;
34+
src.len = 0; // not strictly necessary because we make no guarantees on the source string
35+
return *this;
36+
}
37+
2638
CharString &CharString::copyFrom(const CharString &s, UErrorCode &errorCode) {
2739
if(U_SUCCESS(errorCode) && this!=&s && ensureCapacity(s.len+1, 0, errorCode)) {
2840
len=s.len;

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

+12
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ class U_COMMON_API CharString : public UMemory {
5555
}
5656
~CharString() {}
5757

58+
/**
59+
* Move constructor; might leave src in an undefined state.
60+
* This string will have the same contents and state that the source string had.
61+
*/
62+
CharString(CharString &&src) U_NOEXCEPT;
63+
/**
64+
* Move assignment operator; might leave src in an undefined state.
65+
* This string will have the same contents and state that the source string had.
66+
* The behavior is undefined if *this and src are the same object.
67+
*/
68+
CharString &operator=(CharString &&src) U_NOEXCEPT;
69+
5870
/**
5971
* Replaces this string's contents with the other string's contents.
6072
* CharString does not support the standard copy constructor nor

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

+42-3
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,14 @@ class MaybeStackArray {
299299
* Destructor deletes the array (if owned).
300300
*/
301301
~MaybeStackArray() { releaseArray(); }
302+
/**
303+
* Move constructor: transfers ownership or copies the stack array.
304+
*/
305+
MaybeStackArray(MaybeStackArray<T, stackCapacity> &&src) U_NOEXCEPT;
306+
/**
307+
* Move assignment: transfers ownership or copies the stack array.
308+
*/
309+
MaybeStackArray<T, stackCapacity> &operator=(MaybeStackArray<T, stackCapacity> &&src) U_NOEXCEPT;
302310
/**
303311
* Returns the array capacity (number of T items).
304312
* @return array capacity
@@ -376,6 +384,11 @@ class MaybeStackArray {
376384
uprv_free(ptr);
377385
}
378386
}
387+
void resetToStackArray() {
388+
ptr=stackArray;
389+
capacity=stackCapacity;
390+
needToRelease=FALSE;
391+
}
379392
/* No comparison operators with other MaybeStackArray's. */
380393
bool operator==(const MaybeStackArray & /*other*/) {return FALSE;}
381394
bool operator!=(const MaybeStackArray & /*other*/) {return TRUE;}
@@ -398,6 +411,34 @@ class MaybeStackArray {
398411
#endif
399412
};
400413

414+
template<typename T, int32_t stackCapacity>
415+
icu::MaybeStackArray<T, stackCapacity>::MaybeStackArray(
416+
MaybeStackArray <T, stackCapacity>&& src) U_NOEXCEPT
417+
: ptr(src.ptr), capacity(src.capacity), needToRelease(src.needToRelease) {
418+
if (src.ptr == src.stackArray) {
419+
ptr = stackArray;
420+
uprv_memcpy(stackArray, src.stackArray, sizeof(T) * src.capacity);
421+
} else {
422+
src.resetToStackArray(); // take ownership away from src
423+
}
424+
}
425+
426+
template<typename T, int32_t stackCapacity>
427+
inline MaybeStackArray <T, stackCapacity>&
428+
MaybeStackArray<T, stackCapacity>::operator=(MaybeStackArray <T, stackCapacity>&& src) U_NOEXCEPT {
429+
releaseArray(); // in case this instance had its own memory allocated
430+
capacity = src.capacity;
431+
needToRelease = src.needToRelease;
432+
if (src.ptr == src.stackArray) {
433+
ptr = stackArray;
434+
uprv_memcpy(stackArray, src.stackArray, sizeof(T) * src.capacity);
435+
} else {
436+
ptr = src.ptr;
437+
src.resetToStackArray(); // take ownership away from src
438+
}
439+
return *this;
440+
}
441+
401442
template<typename T, int32_t stackCapacity>
402443
inline T *MaybeStackArray<T, stackCapacity>::resize(int32_t newCapacity, int32_t length) {
403444
if(newCapacity>0) {
@@ -447,9 +488,7 @@ inline T *MaybeStackArray<T, stackCapacity>::orphanOrClone(int32_t length, int32
447488
uprv_memcpy(p, ptr, (size_t)length*sizeof(T));
448489
}
449490
resultCapacity=length;
450-
ptr=stackArray;
451-
capacity=stackCapacity;
452-
needToRelease=FALSE;
491+
resetToStackArray();
453492
return p;
454493
}
455494

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

+28-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
// edits.cpp
55
// created: 2017feb08 Markus W. Scherer
66

7-
#include "unicode/utypes.h"
87
#include "unicode/edits.h"
8+
#include "unicode/unistr.h"
9+
#include "unicode/utypes.h"
910
#include "cmemory.h"
1011
#include "uassert.h"
12+
#include "util.h"
1113

1214
U_NAMESPACE_BEGIN
1315

@@ -773,4 +775,29 @@ int32_t Edits::Iterator::sourceIndexFromDestinationIndex(int32_t i, UErrorCode &
773775
}
774776
}
775777

778+
UnicodeString& Edits::Iterator::toString(UnicodeString& sb) const {
779+
sb.append(u"{ src[", -1);
780+
ICU_Utility::appendNumber(sb, srcIndex);
781+
sb.append(u"..", -1);
782+
ICU_Utility::appendNumber(sb, srcIndex + oldLength_);
783+
if (changed) {
784+
sb.append(u"] ⇝ dest[", -1);
785+
} else {
786+
sb.append(u"] ≡ dest[", -1);
787+
}
788+
ICU_Utility::appendNumber(sb, destIndex);
789+
sb.append(u"..", -1);
790+
ICU_Utility::appendNumber(sb, destIndex + newLength_);
791+
if (changed) {
792+
sb.append(u"], repl[", -1);
793+
ICU_Utility::appendNumber(sb, replIndex);
794+
sb.append(u"..", -1);
795+
ICU_Utility::appendNumber(sb, replIndex + newLength_);
796+
sb.append(u"] }", -1);
797+
} else {
798+
sb.append(u"] (no-change) }", -1);
799+
}
800+
return sb;
801+
}
802+
776803
U_NAMESPACE_END

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ static const char*
10151015
getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
10161016
{
10171017
uint32_t i;
1018-
for (i = 0; i <= this_0->numRegions; i++)
1018+
for (i = 0; i < this_0->numRegions; i++)
10191019
{
10201020
if (this_0->regionMaps[i].hostID == hostID)
10211021
{

0 commit comments

Comments
 (0)