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

Function wasm_table_set

crates/c-api/src/table.rs:82–92  ·  view source on GitHub ↗
(
    t: &mut wasm_table_t,
    index: wasm_table_size_t,
    r: Option<&wasm_ref_t>,
)

Source from the content-addressed store, hash-verified

80#[unsafe(no_mangle)]
81#[cfg(feature = "gc")]
82pub unsafe extern "C" fn wasm_table_set(
83 t: &mut wasm_table_t,
84 index: wasm_table_size_t,
85 r: Option<&wasm_ref_t>,
86) -> bool {
87 let table = t.table();
88 let val = option_wasm_ref_t_to_ref(r, &table.ty(t.ext.store.context()));
89 table
90 .set(t.ext.store.context_mut(), u64::from(index), val)
91 .is_ok()
92}
93
94#[unsafe(no_mangle)]
95pub unsafe extern "C" fn wasm_table_size(t: &wasm_table_t) -> wasm_table_size_t {

Callers

nothing calls this directly

Calls 8

option_wasm_ref_t_to_refFunction · 0.85
fromFunction · 0.85
is_okMethod · 0.80
context_mutMethod · 0.80
tableMethod · 0.45
tyMethod · 0.45
contextMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected