Function
wasmtime_global_set
(
mut store: WasmtimeStoreContextMut<'_>,
global: &Global,
val: &wasmtime_val_t,
)
Source from the content-addressed store, hash-verified
| 121 | |
| 122 | #[unsafe(no_mangle)] |
| 123 | pub unsafe extern "C" fn wasmtime_global_set( |
| 124 | mut store: WasmtimeStoreContextMut<'_>, |
| 125 | global: &Global, |
| 126 | val: &wasmtime_val_t, |
| 127 | ) -> Option<Box<wasmtime_error_t>> { |
| 128 | #[cfg(feature = "gc")] |
| 129 | let mut store = RootScope::new(&mut store); |
| 130 | |
| 131 | let val = val.to_val(&mut store); |
| 132 | handle_result(global.set(&mut store, val), |()| {}) |
| 133 | } |
Tested by
no test coverage detected