(
cx: WasmtimeStoreContextMut<'_>,
arrayref: Option<&wasmtime_arrayref_t>,
out: &mut MaybeUninit<u32>,
)
| 70 | |
| 71 | #[unsafe(no_mangle)] |
| 72 | pub unsafe extern "C" fn wasmtime_arrayref_len( |
| 73 | cx: WasmtimeStoreContextMut<'_>, |
| 74 | arrayref: Option<&wasmtime_arrayref_t>, |
| 75 | out: &mut MaybeUninit<u32>, |
| 76 | ) -> Option<Box<crate::wasmtime_error_t>> { |
| 77 | let arrayref = arrayref |
| 78 | .and_then(|a| a.as_wasmtime()) |
| 79 | .expect("non-null arrayref required"); |
| 80 | match arrayref.len(&cx) { |
| 81 | Ok(len) => { |
| 82 | crate::initialize(out, len); |
| 83 | None |
| 84 | } |
| 85 | Err(e) => Some(Box::new(e.into())), |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | #[unsafe(no_mangle)] |
| 90 | pub unsafe extern "C" fn wasmtime_arrayref_get( |
no test coverage detected