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

Unified Diff: runtime/bin/platform.cc

Issue 11318018: - Represent strings internally in UTF-16 format, this makes it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
Index: runtime/bin/platform.cc
===================================================================
--- runtime/bin/platform.cc (revision 14314)
+++ runtime/bin/platform.cc (working copy)
@@ -16,14 +16,15 @@
void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
Dart_EnterScope();
- Dart_SetReturnValue(args, Dart_NewString(Platform::OperatingSystem()));
+ Dart_SetReturnValue(args,
+ Dart_NewStringFromCString(Platform::OperatingSystem()));
Dart_ExitScope();
}
void FUNCTION_NAME(Platform_PathSeparator)(Dart_NativeArguments args) {
Dart_EnterScope();
- Dart_SetReturnValue(args, Dart_NewString(File::PathSeparator()));
+ Dart_SetReturnValue(args, Dart_NewStringFromCString(File::PathSeparator()));
Dart_ExitScope();
}
@@ -33,7 +34,7 @@
const intptr_t HOSTNAME_LENGTH = 256;
char hostname[HOSTNAME_LENGTH];
if (Platform::LocalHostname(hostname, HOSTNAME_LENGTH)) {
- Dart_SetReturnValue(args, Dart_NewString(hostname));
+ Dart_SetReturnValue(args, Dart_NewStringFromCString(hostname));
} else {
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
}
@@ -56,7 +57,7 @@
Dart_PropagateError(result);
}
for (intptr_t i = 0; i < count; i++) {
- Dart_Handle str = Dart_NewString(env[i]);
+ Dart_Handle str = Dart_NewStringFromCString(env[i]);
if (Dart_IsError(str)) {
Dart_PropagateError(str);
}
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/socket.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698