mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 16:41:33 +00:00
Return type normalization, and change return errors from imported functions
This commit is contained in:
@ -1,8 +1,5 @@
|
||||
use std::mem;
|
||||
use wasmer_runtime_core::{
|
||||
types::{Type, WasmExternType},
|
||||
vm::Ctx,
|
||||
};
|
||||
use wasmer_runtime_core::{types::WasmExternType, vm::Ctx};
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Copy, Clone)]
|
||||
@ -19,12 +16,12 @@ impl VarArgs {
|
||||
}
|
||||
|
||||
unsafe impl WasmExternType for VarArgs {
|
||||
const TYPE: Type = Type::I32;
|
||||
type Native = i32;
|
||||
|
||||
fn to_bits(self) -> u64 {
|
||||
self.pointer as u64
|
||||
fn to_native(self) -> Self::Native {
|
||||
self.pointer as _
|
||||
}
|
||||
fn from_bits(n: u64) -> Self {
|
||||
fn from_native(n: Self::Native) -> Self {
|
||||
Self { pointer: n as u32 }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user