-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: https://github.com/unicode-org/icu/releases/tag/release-68-1 PR-URL: #36187 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
- Loading branch information
Showing
419 changed files
with
12,539 additions
and
5,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
ICU sources - auto generated by shrink-icu-src.py | ||
|
||
This directory contains the ICU subset used by --with-intl=full-icu | ||
It is a strict subset of ICU 67 source files with the following exception(s): | ||
* deps/icu-small/source/data/in/icudt67l.dat.bz2 : compressed data file | ||
It is a strict subset of ICU 68 source files with the following exception(s): | ||
* deps/icu-small/source/data/in/icudt68l.dat.bz2 : compressed data file | ||
|
||
|
||
To rebuild this directory, see ../../tools/icu/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# © 2020 and later: Unicode, Inc. and others. | ||
# License & terms of use: http://www.unicode.org/copyright.html | ||
|
||
--- | ||
Language: Cpp | ||
BasedOnStyle: LLVM | ||
IndentWidth: 4 | ||
ColumnLimit: 105 | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: true | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// © 2020 and later: Unicode, Inc. and others. | ||
// License & terms of use: http://www.unicode.org/copyright.html | ||
|
||
// charstrmap.h | ||
// created: 2020sep01 Frank Yung-Fong Tang | ||
|
||
#ifndef __CHARSTRMAP_H__ | ||
#define __CHARSTRMAP_H__ | ||
|
||
#include <utility> | ||
#include "unicode/utypes.h" | ||
#include "unicode/uobject.h" | ||
#include "uhash.h" | ||
|
||
U_NAMESPACE_BEGIN | ||
|
||
/** | ||
* Map of const char * keys & values. | ||
* Stores pointers as is: Does not own/copy/adopt/release strings. | ||
*/ | ||
class CharStringMap final : public UMemory { | ||
public: | ||
/** Constructs an unusable non-map. */ | ||
CharStringMap() : map(nullptr) {} | ||
CharStringMap(int32_t size, UErrorCode &errorCode) { | ||
map = uhash_openSize(uhash_hashChars, uhash_compareChars, uhash_compareChars, | ||
size, &errorCode); | ||
} | ||
CharStringMap(CharStringMap &&other) U_NOEXCEPT : map(other.map) { | ||
other.map = nullptr; | ||
} | ||
CharStringMap(const CharStringMap &other) = delete; | ||
~CharStringMap() { | ||
uhash_close(map); | ||
} | ||
|
||
CharStringMap &operator=(CharStringMap &&other) U_NOEXCEPT { | ||
map = other.map; | ||
other.map = nullptr; | ||
return *this; | ||
} | ||
CharStringMap &operator=(const CharStringMap &other) = delete; | ||
|
||
const char *get(const char *key) const { return static_cast<const char *>(uhash_get(map, key)); } | ||
void put(const char *key, const char *value, UErrorCode &errorCode) { | ||
uhash_put(map, const_cast<char *>(key), const_cast<char *>(value), &errorCode); | ||
} | ||
|
||
private: | ||
UHashtable *map; | ||
}; | ||
|
||
U_NAMESPACE_END | ||
|
||
#endif // __CHARSTRMAP_H__ |
Oops, something went wrong.