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

Unified Diff: runtime/bin/dartutils.h

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/dartutils.h
===================================================================
--- runtime/bin/dartutils.h (revision 14314)
+++ runtime/bin/dartutils.h (working copy)
@@ -110,6 +110,13 @@
// Create a new Dart OSError object with the provided OS error.
static Dart_Handle NewDartOSError(OSError* os_error);
+ // Create a new Dart String object from a C String.
+ static Dart_Handle NewString(const char* str) {
+ ASSERT((str != NULL) && (strlen(str) != 0));
+ return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str),
+ strlen(str));
+ }
+
static void SetOriginalWorkingDirectory();
// Global state that stores the original working directory..
« no previous file with comments | « runtime/bin/crypto.cc ('k') | runtime/bin/dartutils.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698