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

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: Created 8 years, 2 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/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
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..58251908cd775944ffb2a7e7a01a88cc9181933a 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1620,6 +1620,16 @@ DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
*/
DART_EXPORT bool Dart_IsByteArray(Dart_Handle object);
+
cshapiro 2012/11/01 00:40:19 Remove this line. 1 space between definitions in
Søren Gjesse 2012/11/01 07:46:03 Done.
+/**
+ * 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_IsExternalByteArray(Dart_Handle object);
cshapiro 2012/11/01 00:40:19 I would prefer this to be named Dart_IsByteArrayEx
Søren Gjesse 2012/11/01 07:46:03 Done.
+
+
cshapiro 2012/11/01 00:40:19 Remove this line. 1 space between definitions in
Søren Gjesse 2012/11/01 07:46:03 Done.
/**
* Returns a ByteArray of the desired length.
*
@@ -1630,6 +1640,7 @@ DART_EXPORT bool Dart_IsByteArray(Dart_Handle object);
*/
DART_EXPORT Dart_Handle Dart_NewByteArray(intptr_t length);
+
cshapiro 2012/11/01 00:40:19 1 space between definitions in this header.
Søren Gjesse 2012/11/01 07:46:03 Done.
/**
* Returns a ByteArray which references an external array of 8-bit bytes.
*
@@ -1646,6 +1657,13 @@ 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);
+
+
cshapiro 2012/11/01 00:40:19 1 space between definitions in this header.
Søren Gjesse 2012/11/01 07:46:03 Done.
+/**
* 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') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698