diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-03-15 23:43:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 23:43:17 +0100 |
commit | bb53135ed87ec063c9238e1b7de8cf3b44535685 (patch) | |
tree | 76dfbbfedf1de3482b1d179c46aa855bc6a8e544 /ops/lib.rs | |
parent | 5d60ee7f1280d8000b918e7fb9e11e3ddca779e7 (diff) |
cleanup(core): OpPair => OpDecl (#13952)
Diffstat (limited to 'ops/lib.rs')
-rw-r--r-- | ops/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ops/lib.rs b/ops/lib.rs index 126da368a..718922c59 100644 --- a/ops/lib.rs +++ b/ops/lib.rs @@ -66,13 +66,16 @@ pub fn op(_attr: TokenStream, item: TokenStream) -> TokenStream { stringify!(#name) } - pub fn v8_cb #generics () -> #core::v8::FunctionCallback #where_clause { + pub fn v8_fn_ptr #generics () -> #core::v8::FunctionCallback #where_clause { use #core::v8::MapFnTo; Self::v8_func::<#type_params>.map_fn_to() } - pub fn decl #generics () -> (&'static str, #core::v8::FunctionCallback) #where_clause { - (Self::name(), Self::v8_cb::<#type_params>()) + pub fn decl #generics () -> #core::OpDecl #where_clause { + #core::OpDecl { + name: Self::name(), + v8_fn_ptr: Self::v8_fn_ptr::<#type_params>(), + } } #[inline] |