MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / wasmtime_global_set

Function wasmtime_global_set

crates/c-api/src/global.rs:123–133  ·  view source on GitHub ↗
(
    mut store: WasmtimeStoreContextMut<'_>,
    global: &Global,
    val: &wasmtime_val_t,
)

Source from the content-addressed store, hash-verified

121
122#[unsafe(no_mangle)]
123pub 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}

Callers 3

mainFunction · 0.85
mainFunction · 0.85
setMethod · 0.85

Calls 4

handle_resultFunction · 0.85
to_valMethod · 0.80
newFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected