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

Unified Diff: runtime/include/dart_api.h

Issue 11362009: New APIs for external byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index be97d76bc6b58782a843eb13b2e2e96f55dd3637..1ddd2108778e2effeb1ad7311441795c9913055b 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1621,6 +1621,14 @@ DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
DART_EXPORT bool Dart_IsByteArray(Dart_Handle object);
/**
+ * Is this object an external ByteArray?
+ *
+ * An external ByteArray is a ByteArray which references a fixed array of
+ * bytes which is external to the Dart heap.
+ */
+DART_EXPORT bool Dart_IsByteArrayExternal(Dart_Handle object);
+
+/**
* Returns a ByteArray of the desired length.
*
* \param length The length of the array.
@@ -1646,6 +1654,12 @@ DART_EXPORT Dart_Handle Dart_NewExternalByteArray(uint8_t* data,
Dart_PeerFinalizer callback);
/**
+ * Retrieves the data pointer associated with an external ByteArray.
+ */
+DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetData(Dart_Handle object,
+ void** data);
+
+/**
* Retrieves the peer pointer associated with an external ByteArray.
*/
DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetPeer(Dart_Handle object,
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698