diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-09-27 07:54:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 07:54:43 -0600 |
commit | 8ef52b3e6ac1bb2a369ce2eed2d64997a8d5f3ab (patch) | |
tree | 170fbb79e8a8d63b91d78af8d007dcb5b2c03af2 /ext/ffi/dlfcn.rs | |
parent | 507f24c4746e24ea60dcebdffacd0b66e3d4bfc1 (diff) |
chore(ext/ffi): migrate part of FFI to op2 (#20699)
Diffstat (limited to 'ext/ffi/dlfcn.rs')
-rw-r--r-- | ext/ffi/dlfcn.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/ffi/dlfcn.rs b/ext/ffi/dlfcn.rs index a10bbbe29..fbf91648d 100644 --- a/ext/ffi/dlfcn.rs +++ b/ext/ffi/dlfcn.rs @@ -8,7 +8,7 @@ use crate::turbocall; use crate::FfiPermissions; use deno_core::error::generic_error; use deno_core::error::AnyError; -use deno_core::op; +use deno_core::op2; use deno_core::serde_v8; use deno_core::v8; use deno_core::OpState; @@ -131,11 +131,12 @@ pub struct FfiLoadArgs { symbols: HashMap<String, ForeignSymbol>, } -#[op(v8)] -pub fn op_ffi_load<FP, 'scope>( +#[op2] +#[serde] +pub fn op_ffi_load<'scope, FP>( scope: &mut v8::HandleScope<'scope>, state: &mut OpState, - args: FfiLoadArgs, + #[serde] args: FfiLoadArgs, ) -> Result<(ResourceId, serde_v8::Value<'scope>), AnyError> where FP: FfiPermissions + 'static, |