| 16 | namespace wasmtime { |
| 17 | |
| 18 | inline Result<ArrayRef> ArrayRef::create(Store::Context cx, |
| 19 | const ArrayRefPre &pre, |
| 20 | const Val &elem, uint32_t len) { |
| 21 | wasmtime_arrayref_t out; |
| 22 | auto *err = |
| 23 | wasmtime_arrayref_new(cx.capi(), pre.capi(), elem.capi(), len, &out); |
| 24 | if (err) |
| 25 | return Result<ArrayRef>(Error(err)); |
| 26 | return Result<ArrayRef>(ArrayRef(out)); |
| 27 | } |
| 28 | |
| 29 | inline Result<Val> ArrayRef::get(Store::Context cx, uint32_t index) const { |
| 30 | wasmtime_val_t out; |
nothing calls this directly
no test coverage detected