NewTrap creates a new `Trap` with the `name` and the type provided.
(message string)
| 56 | |
| 57 | // NewTrap creates a new `Trap` with the `name` and the type provided. |
| 58 | func NewTrap(message string) *Trap { |
| 59 | ptr := C.wasmtime_trap_new(C._GoStringPtr(message), C._GoStringLen(message)) |
| 60 | runtime.KeepAlive(message) |
| 61 | return mkTrap(ptr) |
| 62 | } |
| 63 | |
| 64 | func mkTrap(ptr *C.wasm_trap_t) *Trap { |
| 65 | trap := &Trap{_ptr: ptr} |
searching dependent graphs…