mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
Add comment about derefing typecasted pointer
This commit is contained in:
2
lib/api/src/externals/function.rs
vendored
2
lib/api/src/externals/function.rs
vendored
@@ -379,6 +379,8 @@ where
|
||||
Env: Sized + 'static,
|
||||
{
|
||||
fn call(&self, args: &[Val]) -> Result<Vec<Val>, RuntimeError> {
|
||||
// TODO: the `&mut *self.env.as_ptr()` is likely invoking some "mild"
|
||||
// undefined behavior due to how it's used in the static fn call
|
||||
unsafe { (*self.func)(&mut *self.env.as_ptr(), &args) }
|
||||
}
|
||||
fn function_type(&self) -> &FunctionType {
|
||||
|
||||
Reference in New Issue
Block a user