Function
wasmtime_table_get
(
store: WasmtimeStoreContextMut<'_>,
table: &Table,
index: u64,
ret: &mut MaybeUninit<wasmtime_val_t>,
)
Source from the content-addressed store, hash-verified
| 151 | |
| 152 | #[unsafe(no_mangle)] |
| 153 | pub extern "C" fn wasmtime_table_get( |
| 154 | store: WasmtimeStoreContextMut<'_>, |
| 155 | table: &Table, |
| 156 | index: u64, |
| 157 | ret: &mut MaybeUninit<wasmtime_val_t>, |
| 158 | ) -> bool { |
| 159 | let mut store = store; |
| 160 | |
| 161 | #[cfg(feature = "gc")] |
| 162 | let mut store = RootScope::new(&mut store); |
| 163 | |
| 164 | match table.get(&mut store, index) { |
| 165 | Some(r) => { |
| 166 | crate::initialize(ret, wasmtime_val_t::from_val(&mut store, r.into())); |
| 167 | true |
| 168 | } |
| 169 | None => false, |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | #[unsafe(no_mangle)] |
| 174 | pub unsafe extern "C" fn wasmtime_table_set( |
Tested by
no test coverage detected