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

Unified Diff: runtime/include/dart_api.h

Issue 10306002: Do not externalize Dart strings as C strings for "print()". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 7de23770eaee0e61f9238f6aa9c9b251f9e06090..7442c6a9bc0f6f106bdcb46c45536fa76e33267e 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1256,6 +1256,21 @@ DART_EXPORT Dart_Handle Dart_StringGet32(Dart_Handle str,
DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str,
const char** utf8);
+/**
+ * Gets a UTF-8 encoded representation of a String.
+ *
+ * \param str A string.
+ * \param codeunits Returns the String represented as an array of UTF-8
+ * code units. This array is scope allocated and is only valid until
+ * the next call to Dart_ExitScope.
+ * \param length Returns the length of the code units array in bytes.
+ *
+ * \return A valid handle if no error occurs during the operation.
+ */
+DART_EXPORT Dart_Handle Dart_StringToBytes(Dart_Handle str,
+ const uint8_t** codeunits,
+ intptr_t* length);
+
// --- Lists ---
/**

Powered by Google App Engine
This is Rietveld 408576698