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

Unified Diff: runtime/include/dart_api.h

Issue 22980022: Setup a peer for read only strings that are not externalized in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 26534)
+++ runtime/include/dart_api.h (working copy)
@@ -1410,12 +1410,6 @@
intptr_t length);
/**
- * Retrieves the peer pointer associated with an external String.
- */
-DART_EXPORT Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle object,
- void** peer);
-
-/**
* Returns a String which references an external array of
* Latin-1 (ISO-8859-1) encoded characters.
*
@@ -1536,8 +1530,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.
+ * the string data is copied into the external space specified
+ * and the passed in peer is setup as a peer for this string object.
+ * In this case the function returns the original String object as is.
*
* For example:
* intptr_t size;
@@ -1562,7 +1557,8 @@
* \param str A String.
* \param char_size Returns the character size of the String.
* \param str_len Returns the length of the String.
- * \param peer Returns the peer pointer if the String is an external String.
+ * \param peer Returns the peer pointer associated with the String or 0 if
+ * there is no peer pointer for it.
* \return Success if no error occurs. Otherwise returns
* an error handle.
*/
@@ -2001,9 +1997,10 @@
* Gets a string native argument at some index.
* \param args Native arguments structure.
* \param arg_index Index of the desired argument in the structure above.
- * \param peer Returns the peer pointer if the String is an external String.
- * \return the String object if no error occurs. Otherwise returns
- * an error handle.
+ * \param peer Returns the peer pointer if the string argument has one.
+ * \return Success if the string argument has a peer, if it does not
+ * have a peer then the String object is returned. Otherwise returns
+ * an error handle (argument is not a String object).
*/
DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args,
int arg_index,
« no previous file with comments | « no previous file | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698