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

Unified Diff: include/dart_api.h

Issue 11580003: Changes per discussion with Anton (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/dart_api.h
===================================================================
--- include/dart_api.h (revision 16135)
+++ include/dart_api.h (working copy)
@@ -1479,6 +1479,23 @@
intptr_t* length);
/**
+ * Gets the data corresponding to the string object. This function returns
+ * the data only for Latin-1 (ISO-8859-1) string objects. For all other
+ * string objects it return and error.
+ *
+ * \param str A string.
+ * \param latin1_array An array allocated by the caller, used to return
+ * the string data.
+ * \param length Used to pass in the length of the provided array.
+ * Used to return the length of the array which was actually used.
+ *
+ * \return A valid handle if no error occurs during the operation.
+ */
+DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str,
+ uint8_t* latin1_array,
+ intptr_t* length);
+
+/**
* Gets the UTF-16 encoded representation of a string.
*
* \param str A string.
@@ -1517,6 +1534,9 @@
*
* \return the converted ExternalString object if no error occurs.
* Otherwise returns an error handle.
+ * If the object is a valid string but if it cannot be externalized
+ * then Dart_Null() is returned and the string data is copied into
+ * the external space specified.
*
* For example:
* intptr_t size;
« no previous file with comments | « no previous file | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698