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

Function cvt_extern

crates/c-api/include/wasmtime/extern.hh:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19// `wasmtime_extern_t`.
20namespace detail {
21static Extern cvt_extern(wasmtime_extern_t &e) {
22 switch (e.kind) {
23 case WASMTIME_EXTERN_FUNC:
24 return Func(e.of.func);
25 case WASMTIME_EXTERN_GLOBAL:
26 return Global(e.of.global);
27 case WASMTIME_EXTERN_MEMORY:
28 return Memory(e.of.memory);
29 case WASMTIME_EXTERN_TABLE:
30 return Table(e.of.table);
31 case WASMTIME_EXTERN_TAG:
32 return Tag(e.of.tag);
33 }
34 std::abort();
35}
36
37static void cvt_extern(const Extern &e, wasmtime_extern_t &raw) {
38 if (const auto *func = std::get_if<Func>(&e)) {

Callers 5

createMethod · 0.85
getMethod · 0.85
get_exportMethod · 0.85
defineMethod · 0.85
getMethod · 0.85

Calls 7

abortFunction · 0.85
FuncClass · 0.70
GlobalClass · 0.70
MemoryClass · 0.70
TableClass · 0.70
TagClass · 0.70
capiMethod · 0.45

Tested by

no test coverage detected