Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d190c9a

Browse filesBrowse files
srl295MylesBorins
authored andcommitted
src: add "icu::" prefix before ICU symbols
In ICU 61.x, icu4c will no longer put its declarations in the global namespace. Everything will be in the "icu::" namespace (or icu_60:: in the linker). Prepare for this. https://ssl.icu-project.org/trac/ticket/13460
1 parent 4981e98 commit d190c9a
Copy full SHA for d190c9a

File tree

Expand file treeCollapse file tree

3 files changed

+13
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+13
-12
lines changed
Open diff view settings
Collapse file

‎src/inspector_io.cc‎

Copy file name to clipboardExpand all lines: src/inspector_io.cc
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ std::string StringViewToUtf8(const StringView& view) {
7474

7575
size_t result_length = view.length() * sizeof(*source);
7676
std::string result(result_length, '\0');
77-
UnicodeString utf16(unicodeSource, view.length());
77+
icu::UnicodeString utf16(unicodeSource, view.length());
7878
// ICU components for std::string compatibility are not enabled in build...
7979
bool done = false;
8080
while (!done) {
81-
CheckedArrayByteSink sink(&result[0], result_length);
81+
icu::CheckedArrayByteSink sink(&result[0], result_length);
8282
utf16.toUTF8(sink);
8383
result_length = sink.NumberOfBytesAppended();
8484
result.resize(result_length);
@@ -111,8 +111,9 @@ void ReleasePairOnAsyncClose(uv_handle_t* async) {
111111
} // namespace
112112

113113
std::unique_ptr<StringBuffer> Utf8ToStringView(const std::string& message) {
114-
UnicodeString utf16 =
115-
UnicodeString::fromUTF8(StringPiece(message.data(), message.length()));
114+
icu::UnicodeString utf16 =
115+
icu::UnicodeString::fromUTF8(icu::StringPiece(message.data(),
116+
message.length()));
116117
StringView view(reinterpret_cast<const uint16_t*>(utf16.getBuffer()),
117118
utf16.length());
118119
return StringBuffer::create(view);
Collapse file

‎src/node_i18n.cc‎

Copy file name to clipboardExpand all lines: src/node_i18n.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ const char* GetVersion(const char* type,
523523
} else if (!strcmp(type, TYPE_UNICODE)) {
524524
return U_UNICODE_VERSION;
525525
} else if (!strcmp(type, TYPE_TZ)) {
526-
return TimeZone::getTZDataVersion(*status);
526+
return icu::TimeZone::getTZDataVersion(*status);
527527
} else if (!strcmp(type, TYPE_CLDR)) {
528528
UVersionInfo versionArray;
529529
ulocdata_getCLDRVersion(versionArray, status);
Collapse file

‎tools/icu/iculslocs.cc‎

Copy file name to clipboardExpand all lines: tools/icu/iculslocs.cc
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ int VERBOSE = 0;
6464
#define RES_INDEX "res_index"
6565
#define INSTALLEDLOCALES "InstalledLocales"
6666

67-
CharString packageName;
67+
icu::CharString packageName;
6868
const char* locale = RES_INDEX; // locale referring to our index
6969

7070
void usage() {
@@ -147,7 +147,7 @@ int localeExists(const char* loc, UBool* exists) {
147147
if (VERBOSE > 1) {
148148
printf("Trying to open %s:%s\n", packageName.data(), loc);
149149
}
150-
LocalUResourceBundlePointer aResource(
150+
icu::LocalUResourceBundlePointer aResource(
151151
ures_openDirect(packageName.data(), loc, &status));
152152
*exists = FALSE;
153153
if (U_SUCCESS(status)) {
@@ -189,11 +189,11 @@ void printIndent(FILE* bf, int indent) {
189189
* @return 0 for OK, 1 for err
190190
*/
191191
int dumpAllButInstalledLocales(int lev,
192-
LocalUResourceBundlePointer* bund,
192+
icu::LocalUResourceBundlePointer* bund,
193193
FILE* bf,
194194
UErrorCode* status) {
195195
ures_resetIterator(bund->getAlias());
196-
LocalUResourceBundlePointer t;
196+
icu::LocalUResourceBundlePointer t;
197197
while (U_SUCCESS(*status) && ures_hasNext(bund->getAlias())) {
198198
t.adoptInstead(ures_getNextResource(bund->getAlias(), t.orphan(), status));
199199
ASSERT_SUCCESS(status, "while processing table");
@@ -254,10 +254,10 @@ int list(const char* toBundle) {
254254
printf("\"locale\": %s\n", locale);
255255
}
256256

257-
LocalUResourceBundlePointer bund(
257+
icu::LocalUResourceBundlePointer bund(
258258
ures_openDirect(packageName.data(), locale, &status));
259259
ASSERT_SUCCESS(&status, "while opening the bundle");
260-
LocalUResourceBundlePointer installedLocales(
260+
icu::LocalUResourceBundlePointer installedLocales(
261261
// NOLINTNEXTLINE (readability/null_usage)
262262
ures_getByKey(bund.getAlias(), INSTALLEDLOCALES, NULL, &status));
263263
ASSERT_SUCCESS(&status, "while fetching installed locales");
@@ -295,7 +295,7 @@ int list(const char* toBundle) {
295295
}
296296

297297
// OK, now list them.
298-
LocalUResourceBundlePointer subkey;
298+
icu::LocalUResourceBundlePointer subkey;
299299

300300
int validCount = 0;
301301
for (int32_t i = 0; i < count; i++) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.