MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / wasmtime_trap_code

Function wasmtime_trap_code

crates/c-api/src/trap.rs:181–188  ·  view source on GitHub ↗
(raw: &wasm_trap_t, code: &mut u8)

Source from the content-addressed store, hash-verified

179
180#[unsafe(no_mangle)]
181pub extern "C" fn wasmtime_trap_code(raw: &wasm_trap_t, code: &mut u8) -> bool {
182 let trap = match raw.error.downcast_ref::<Trap>() {
183 Some(trap) => trap,
184 None => return false,
185 };
186 *code = *trap as u8;
187 true
188}
189
190#[unsafe(no_mangle)]
191pub extern "C" fn wasm_frame_func_index(frame: &wasm_frame_t<'_>) -> u32 {

Callers 2

mainFunction · 0.85
codeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected