(
store: &mut wasm_store_t,
mt: &wasm_memorytype_t,
)
| 33 | |
| 34 | #[unsafe(no_mangle)] |
| 35 | pub unsafe extern "C" fn wasm_memory_new( |
| 36 | store: &mut wasm_store_t, |
| 37 | mt: &wasm_memorytype_t, |
| 38 | ) -> Option<Box<wasm_memory_t>> { |
| 39 | let memory = Memory::new(store.store.context_mut(), mt.ty().ty.clone()).ok()?; |
| 40 | Some(Box::new(wasm_memory_t { |
| 41 | ext: wasm_extern_t { |
| 42 | store: store.store.clone(), |
| 43 | which: memory.into(), |
| 44 | }, |
| 45 | })) |
| 46 | } |
| 47 | |
| 48 | #[unsafe(no_mangle)] |
| 49 | pub extern "C" fn wasm_memory_as_extern(m: &mut wasm_memory_t) -> &mut wasm_extern_t { |
nothing calls this directly
no test coverage detected