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

Function wasmtime_table_grow

crates/c-api/src/table.rs:198–215  ·  view source on GitHub ↗
(
    mut store: WasmtimeStoreContextMut<'_>,
    table: &Table,
    delta: u64,
    val: &wasmtime_val_t,
    prev_size: &mut u64,
)

Source from the content-addressed store, hash-verified

196
197#[unsafe(no_mangle)]
198pub unsafe extern "C" fn wasmtime_table_grow(
199 mut store: WasmtimeStoreContextMut<'_>,
200 table: &Table,
201 delta: u64,
202 val: &wasmtime_val_t,
203 prev_size: &mut u64,
204) -> Option<Box<wasmtime_error_t>> {
205 #[cfg(feature = "gc")]
206 let mut store = RootScope::new(&mut store);
207
208 handle_result(
209 val.to_val(&mut store)
210 .ref_()
211 .ok_or_else(|| format_err!("wasmtime_table_grow value is not a reference"))
212 .and_then(|val| table.grow(&mut store, delta, val)),
213 |prev| *prev_size = prev,
214 )
215}

Callers 1

growMethod · 0.85

Calls 5

handle_resultFunction · 0.85
ref_Method · 0.80
to_valMethod · 0.80
newFunction · 0.50
growMethod · 0.45

Tested by

no test coverage detected