mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 13:48:26 +00:00
chore(api) improve documentation.
This commit is contained in:
8
lib/api/src/externals/function.rs
vendored
8
lib/api/src/externals/function.rs
vendored
@@ -925,7 +925,7 @@ mod inner {
|
|||||||
/// This is a function that wraps the real host
|
/// This is a function that wraps the real host
|
||||||
/// function. Its address will be used inside the
|
/// function. Its address will be used inside the
|
||||||
/// runtime.
|
/// runtime.
|
||||||
extern fn func_wrapper<$( $x, )* Rets, RetsAsResult, Func>( _: usize, $($x: $x::Native, )* ) -> Rets::CStruct
|
extern fn func_wrapper<$( $x, )* Rets, RetsAsResult, Func>( _: usize, $( $x: $x::Native, )* ) -> Rets::CStruct
|
||||||
where
|
where
|
||||||
$( $x: FromToNativeWasmType, )*
|
$( $x: FromToNativeWasmType, )*
|
||||||
Rets: WasmTypeList,
|
Rets: WasmTypeList,
|
||||||
@@ -944,10 +944,12 @@ mod inner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func_wrapper::<$( $x, )* Rets, RetsAsResult, Self> as *const VMFunctionBody
|
func_wrapper::< $( $x, )* Rets, RetsAsResult, Self > as *const VMFunctionBody
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Implement `HostFunction` for a function that has the same arity than the tuple.
|
||||||
|
// This specific function has an environment.
|
||||||
#[allow(unused_parens)]
|
#[allow(unused_parens)]
|
||||||
impl< $( $x, )* Rets, RetsAsResult, Env, Func >
|
impl< $( $x, )* Rets, RetsAsResult, Env, Func >
|
||||||
HostFunction<( $( $x ),* ), Rets, WithEnv, Env>
|
HostFunction<( $( $x ),* ), Rets, WithEnv, Env>
|
||||||
@@ -986,7 +988,7 @@ mod inner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func_wrapper::<$( $x, )* Rets, RetsAsResult, Env, Self> as *const VMFunctionBody
|
func_wrapper::< $( $x, )* Rets, RetsAsResult, Env, Self > as *const VMFunctionBody
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user