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

Unified Diff: include/dart_api.h

Issue 11275107: Fix length computation in Dart_StringToUTF8. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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: include/dart_api.h
===================================================================
--- include/dart_api.h (revision 14418)
+++ include/dart_api.h (working copy)
@@ -1455,15 +1455,16 @@
* Gets a UTF-8 encoded representation of a String.
*
* \param str A string.
- * \param utf8_array An array allocated by the caller, used to return
- * the array of UTF-8 encoded characters.
- * \param length Used to pass in the length of the provided array.
- * Used to return the length of the array which was actually used.
+ * \param utf8_array Returns the String represented as UTF-8 code
+ * units. This UTF-8 array is scope allocated and is only valid
+ * until the next call to Dart_ExitScope.
+ * \param length 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_StringToUTF8(Dart_Handle str,
- uint8_t* utf8_array,
+ uint8_t** utf8_array,
intptr_t* length);
/**
« bin/builtin_natives.cc ('K') | « bin/builtin_natives.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698