Fix Trap not doing opaque correctly

main
copygirl 2 years ago
parent 450c4157f9
commit c85bae6d5f
  1. 6
      src/trap.zig

@ -76,14 +76,14 @@ pub const TrapCode = enum(u8) {
} }
}; };
pub const Trap = struct { pub const Trap = opaque {
/// Creates a new trap. /// Creates a new trap.
/// The `Trap` returned is owned by the caller. /// The `Trap` returned is owned by the caller.
pub fn init(message: [:0]const u8) Trap { pub fn init(message: [:0]const u8) *Trap {
return wasmtime_trap_new(message.ptr, message.len + 1); return wasmtime_trap_new(message.ptr, message.len + 1);
} }
pub fn copy(self: *const Trap) Trap { pub fn copy(self: *const Trap) *Trap {
return wasm_trap_copy(self); return wasm_trap_copy(self);
} }

Loading…
Cancel
Save