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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 11368138: Add some support for the code-point code-unit distinction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 202a81fd5bdc560a189954585a4f80466eae9376..6a5a9bf82c68ca698cc2b659b0347ee59a30e122 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1700,7 +1700,7 @@ DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str,
intptr_t str_len = str_obj.Length();
intptr_t copy_len = (str_len > *length) ? *length : str_len;
for (intptr_t i = 0; i < copy_len; i++) {
- utf16_array[i] = static_cast<uint16_t>(str_obj.CharAt(i));
+ utf16_array[i] = static_cast<uint16_t>(str_obj.CodeUnitAt(i));
}
*length = copy_len;
return Api::Success(isolate);
@@ -2598,7 +2598,7 @@ DART_EXPORT Dart_Handle Dart_ClassGetFunctionTypeSignature(Dart_Handle clazz) {
// Outside of the vm, we expose setter names with a trailing '='.
static bool HasExternalSetterSuffix(const String& name) {
- return name.CharAt(name.Length() - 1) == '=';
+ return name.CodeUnitAt(name.Length() - 1) == '=';
}

Powered by Google App Engine
This is Rietveld 408576698