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

Function wasmtime_sharedmemory_new

crates/c-api/src/sharedmemory.rs:11–20  ·  view source on GitHub ↗
(
    engine: &crate::wasm_engine_t,
    ty: &wasm_memorytype_t,
    ret: &mut *mut wasmtime_sharedmemory_t,
)

Source from the content-addressed store, hash-verified

9#[unsafe(no_mangle)]
10#[cfg(feature = "threads")]
11pub extern "C" fn wasmtime_sharedmemory_new(
12 engine: &crate::wasm_engine_t,
13 ty: &wasm_memorytype_t,
14 ret: &mut *mut wasmtime_sharedmemory_t,
15) -> Option<Box<wasmtime_error_t>> {
16 handle_result(
17 SharedMemory::new(&engine.engine, ty.ty().ty.clone()),
18 |mem| *ret = Box::<wasmtime_sharedmemory_t>::into_raw(Box::new(mem)),
19 )
20}
21
22#[unsafe(no_mangle)]
23pub extern "C" fn wasmtime_sharedmemory_clone(

Callers

nothing calls this directly

Calls 4

handle_resultFunction · 0.85
newFunction · 0.50
cloneMethod · 0.45
tyMethod · 0.45

Tested by

no test coverage detected