Function
wasmtime_table_grow
(
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)] |
| 198 | pub 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 | } |
Tested by
no test coverage detected