MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime-go / Memory

Method Memory

extern.go:80–88  ·  view source on GitHub ↗

Memory returns a Memory if this export is a memory or nil otherwise

()

Source from the content-addressed store, hash-verified

78
79// Memory returns a Memory if this export is a memory or nil otherwise
80func (e *Extern) Memory() *Memory {
81 ptr := e.ptr()
82 if ptr.kind != C.WASMTIME_EXTERN_MEMORY {
83 return nil
84 }
85 ret := mkMemory(C.go_wasmtime_extern_memory_get(ptr))
86 runtime.KeepAlive(e)
87 return ret
88}
89
90// Table returns a Table if this export is a table or nil otherwise
91func (e *Extern) Table() *Table {

Callers 2

TestInstanceFunction · 0.80
ExampleMemoryFunction · 0.80

Calls 2

ptrMethod · 0.95
mkMemoryFunction · 0.85

Tested by 2

TestInstanceFunction · 0.64
ExampleMemoryFunction · 0.64