(
store: &mut wasm_store_t,
tt: &wasm_tabletype_t,
init: Option<&wasm_ref_t>,
)
| 44 | #[unsafe(no_mangle)] |
| 45 | #[cfg(feature = "gc")] |
| 46 | pub unsafe extern "C" fn wasm_table_new( |
| 47 | store: &mut wasm_store_t, |
| 48 | tt: &wasm_tabletype_t, |
| 49 | init: Option<&wasm_ref_t>, |
| 50 | ) -> Option<Box<wasm_table_t>> { |
| 51 | let tt = tt.ty().ty.clone(); |
| 52 | let init = option_wasm_ref_t_to_ref(init, &tt); |
| 53 | let table = Table::new(store.store.context_mut(), tt, init).ok()?; |
| 54 | Some(Box::new(wasm_table_t { |
| 55 | ext: wasm_extern_t { |
| 56 | store: store.store.clone(), |
| 57 | which: table.into(), |
| 58 | }, |
| 59 | })) |
| 60 | } |
| 61 | |
| 62 | #[unsafe(no_mangle)] |
| 63 | pub unsafe extern "C" fn wasm_table_type(t: &wasm_table_t) -> Box<wasm_tabletype_t> { |
nothing calls this directly
no test coverage detected