mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-25 06:31:32 +00:00
Use WasmExternType for VarArgs
This commit is contained in:
@ -1,7 +1,11 @@
|
||||
use std::mem;
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
use wasmer_runtime_core::{
|
||||
vm::Ctx,
|
||||
types::{Type, WasmExternType},
|
||||
};
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct VarArgs {
|
||||
pub pointer: u32, // assuming 32bit wasm
|
||||
}
|
||||
@ -13,3 +17,7 @@ impl VarArgs {
|
||||
unsafe { (ptr as *const T).read() }
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl WasmExternType for VarArgs {
|
||||
const TYPE: Type = Type::I32;
|
||||
}
|
Reference in New Issue
Block a user