Function
wasmtime_table_set
(
mut store: WasmtimeStoreContextMut<'_>,
table: &Table,
index: u64,
val: &wasmtime_val_t,
)
Source from the content-addressed store, hash-verified
| 172 | |
| 173 | #[unsafe(no_mangle)] |
| 174 | pub unsafe extern "C" fn wasmtime_table_set( |
| 175 | mut store: WasmtimeStoreContextMut<'_>, |
| 176 | table: &Table, |
| 177 | index: u64, |
| 178 | val: &wasmtime_val_t, |
| 179 | ) -> Option<Box<wasmtime_error_t>> { |
| 180 | #[cfg(feature = "gc")] |
| 181 | let mut store = RootScope::new(&mut store); |
| 182 | |
| 183 | handle_result( |
| 184 | val.to_val(&mut store) |
| 185 | .ref_() |
| 186 | .ok_or_else(|| format_err!("wasmtime_table_set value is not a reference")) |
| 187 | .and_then(|val| table.set(&mut store, index, val)), |
| 188 | |()| {}, |
| 189 | ) |
| 190 | } |
| 191 | |
| 192 | #[unsafe(no_mangle)] |
| 193 | pub extern "C" fn wasmtime_table_size(store: WasmtimeStoreContext<'_>, table: &Table) -> u64 { |
Tested by
no test coverage detected