diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2018-12-13 16:25:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-13 16:25:42 -0500 |
| commit | f986eb25c575747efddcbbcbd8ab429a32312983 (patch) | |
| tree | 644e550afc88ae370bb0d0eb010b8dff21315156 /libdeno/deno.h | |
| parent | 2cb52cc4d19b212c4a1095ca4f668fe62b237c7a (diff) | |
Merge deno_new_snapshotter behavior into deno_new (#1318)
Diffstat (limited to 'libdeno/deno.h')
| -rw-r--r-- | libdeno/deno.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libdeno/deno.h b/libdeno/deno.h index 48356bc86..e0ba63153 100644 --- a/libdeno/deno.h +++ b/libdeno/deno.h @@ -30,14 +30,13 @@ const char* deno_v8_version(); void deno_set_v8_flags(int* argc, char** argv); typedef struct { - deno_buf shared; // Shared buffer to be mapped to libdeno.shared - deno_recv_cb recv_cb; // Maps to libdeno.send() calls. + int will_snapshot; // Default 0. If calling deno_get_snapshot 1. + deno_buf load_snapshot; // Optionally: A deno_buf from deno_get_snapshot. + deno_buf shared; // Shared buffer to be mapped to libdeno.shared + deno_recv_cb recv_cb; // Maps to libdeno.send() calls. } deno_config; -Deno* deno_new(deno_buf snapshot, deno_config config); - -Deno* deno_new_snapshotter(deno_config config, const char* js_filename, - const char* js_source); +Deno* deno_new(deno_config config); // Generate a snapshot. The resulting buf can be used with deno_new. // The caller must free the returned data by calling delete[] buf.data_ptr. |
