Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: src/i18n.cc

Issue 2738503008: Prepare for ICU's switch to char16_t (Closed)
Patch Set: do not include uvernum.h in runtime-i18n.cc : no longer necessary Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.cc
diff --git a/src/i18n.cc b/src/i18n.cc
index d2245ef34a9a319a53b4cf4b4ea05ec095fef2d5..7c22871ff5e440f771659d44a0db013b34ec2105 100644
--- a/src/i18n.cc
+++ b/src/i18n.cc
@@ -30,8 +30,13 @@
#include "unicode/ucol.h"
#include "unicode/ucurr.h"
#include "unicode/unum.h"
+#include "unicode/uvernum.h"
#include "unicode/uversion.h"
+#if U_ICU_VERSION_MAJOR_NUM >= 59
+#include "unicode/char16ptr.h"
+#endif
+
namespace v8 {
namespace internal {
@@ -270,8 +275,13 @@ icu::DecimalFormat* CreateICUNumberFormat(
}
UErrorCode status_digits = U_ZERO_ERROR;
+#if U_ICU_VERSION_MAJOR_NUM >= 59
uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
- currency.getTerminatedBuffer(), &status_digits);
+ icu::toUCharPtr(currency.getTerminatedBuffer()), &status_digits);
+#else
+ uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
+ currency.getTerminatedBuffer(), &status_digits);
+#endif
if (U_SUCCESS(status_digits)) {
number_format->setMinimumFractionDigits(fraction_digits);
number_format->setMaximumFractionDigits(fraction_digits);
« no previous file with comments | « no previous file | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698