From 67182912d76428ba25ae1ee5fe3f16319da2ed25 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 7 Feb 2018 16:42:21 -0800 Subject: [PATCH] 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 --- src/inspector_io.cc | 9 +++++---- src/node_i18n.cc | 2 +- tools/icu/iculslocs.cc | 14 +++++++------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/vendor/node/src/inspector_io.cc b/src/inspector_io.cc index 538cbab3c9f..539cdb55019 100644 --- a/vendor/node/src/inspector_io.cc +++ b/vendor/node/src/inspector_io.cc @@ -74,11 +74,11 @@ std::string StringViewToUtf8(const StringView& view) { size_t result_length = view.length() * sizeof(*source); std::string result(result_length, '\0'); - UnicodeString utf16(unicodeSource, view.length()); + icu::UnicodeString utf16(unicodeSource, view.length()); // ICU components for std::string compatibility are not enabled in build... bool done = false; while (!done) { - CheckedArrayByteSink sink(&result[0], result_length); + icu::CheckedArrayByteSink sink(&result[0], result_length); utf16.toUTF8(sink); result_length = sink.NumberOfBytesAppended(); result.resize(result_length); @@ -111,8 +111,9 @@ void ReleasePairOnAsyncClose(uv_handle_t* async) { } // namespace std::unique_ptr Utf8ToStringView(const std::string& message) { - UnicodeString utf16 = - UnicodeString::fromUTF8(StringPiece(message.data(), message.length())); + icu::UnicodeString utf16 = + icu::UnicodeString::fromUTF8(icu::StringPiece(message.data(), + message.length())); StringView view(reinterpret_cast(utf16.getBuffer()), utf16.length()); return StringBuffer::create(view); diff --git a/vendor/node/src/node_i18n.cc b/src/node_i18n.cc index cc02092dd86..1fbc3dcb6b8 100644 --- a/vendor/node/src/node_i18n.cc +++ b/vendor/node/src/node_i18n.cc @@ -523,7 +523,7 @@ const char* GetVersion(const char* type, } else if (!strcmp(type, TYPE_UNICODE)) { return U_UNICODE_VERSION; } else if (!strcmp(type, TYPE_TZ)) { - return TimeZone::getTZDataVersion(*status); + return icu::TimeZone::getTZDataVersion(*status); } else if (!strcmp(type, TYPE_CLDR)) { UVersionInfo versionArray; ulocdata_getCLDRVersion(versionArray, status);