diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-08-07 14:02:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 14:02:29 -0400 |
commit | e438ac2c74c823882dc9c9ecde2a9e9ed7bcfb4b (patch) | |
tree | 480b2daa83e31b26c5d611feff021674d289e492 /core/libdeno.rs | |
parent | 5350abbc7ffdba6d17166fa00ad89e86979a43f7 (diff) |
Add op_id throughout op API (#2734)
Removes the magic number hack to switch between flatbuffers and the
minimal dispatcher.
Adds machinery to pass the op_id through the shared_queue.
Diffstat (limited to 'core/libdeno.rs')
-rw-r--r-- | core/libdeno.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/libdeno.rs b/core/libdeno.rs index c402d8754..071f6ddf5 100644 --- a/core/libdeno.rs +++ b/core/libdeno.rs @@ -12,6 +12,8 @@ use std::ptr::null; use std::ptr::NonNull; use std::slice; +pub type OpId = u32; + // TODO(F001): change this definition to `extern { pub type isolate; }` // After RFC 1861 is stablized. See https://github.com/rust-lang/rust/issues/43467. #[repr(C)] @@ -188,7 +190,8 @@ impl Snapshot2<'_> { #[allow(non_camel_case_types)] type deno_recv_cb = unsafe extern "C" fn( user_data: *mut c_void, - control_buf: deno_buf, // deprecated + op_id: OpId, + control_buf: deno_buf, zero_copy_buf: deno_pinned_buf, ); @@ -266,6 +269,7 @@ extern "C" { pub fn deno_respond( i: *const isolate, user_data: *const c_void, + op_id: OpId, buf: deno_buf, ); pub fn deno_pinned_buf_delete(buf: &mut deno_pinned_buf); |