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

Unified Diff: runtime/include/dart_api.h

Issue 8761007: Stop using void* types in the dart embedding api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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/lib/isolate.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 1987)
+++ runtime/include/dart_api.h (working copy)
@@ -93,7 +93,7 @@
* the lifetime of the current isolate unless they are explicitly
* deallocated (see Dart_DeletePersistentHandle).
*/
-typedef void* Dart_Handle;
+typedef struct _Dart_Handle* Dart_Handle;
/**
* Is this an error handle?
@@ -284,20 +284,15 @@
* isolate in order to function without error. The current isolate is
* set by any call to Dart_CreateIsolate or Dart_EnterIsolate.
*/
-typedef void* Dart_Isolate;
+typedef struct _Dart_Isolate* Dart_Isolate;
/**
- * A buffer containing a snapshot of the Dart VM. A snapshot can be
- * used to restore the VM quickly to a saved state and is useful for
- * fast startup.
- */
-typedef void Dart_Snapshot;
-
-/**
- * Creates a new isolate. If snapshot data is provided, the isolate
- * will be started using that snapshot data. The new isolate becomes
- * the current isolate.
+ * Creates a new isolate. The new isolate becomes the current isolate.
*
+ * A snapshot can be used to restore the VM quickly to a saved state
+ * and is useful for fast startup. If snapshot data is provided, the
+ * isolate will be started using that snapshot data.
+ *
* Requires there to be no current isolate.
*
* \param snapshot A buffer containing a VM snapshot or NULL if no
@@ -306,7 +301,7 @@
* \return The new isolate is returned. May be NULL if an error
* occurs duing isolate initialization.
*/
-DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot,
+DART_EXPORT Dart_Isolate Dart_CreateIsolate(const uint8_t* snapshot,
void* callback_data,
char** error);
// TODO(turnidge): Document behavior when there is already a current
@@ -353,15 +348,13 @@
*/
DART_EXPORT Dart_Handle Dart_CreateSnapshot(uint8_t** snaphot_buffer,
intptr_t* snapshot_size);
-// TODO(turnidge): Does this include the current script or only libs?
-// is it possible to take a snapshot and load more scripts into it?
// --- Messages and Ports ---
/**
* Messages are used to communicate between isolates.
*/
-typedef void* Dart_Message;
+typedef struct _Dart_Message* Dart_Message;
/**
* A port is used to send or receive inter-isolate messages
@@ -1118,7 +1111,7 @@
* native function by index. It also allows the return value of a
* native function to be set.
*/
-typedef void* Dart_NativeArguments;
+typedef struct _Dart_NativeArguments* Dart_NativeArguments;
/**
* Gets the native argument at some index.
« no previous file with comments | « no previous file | runtime/lib/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698