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

Method Global

extern.go:69–77  ·  view source on GitHub ↗

Global returns a Global if this export is a global or nil otherwise

()

Source from the content-addressed store, hash-verified

67
68// Global returns a Global if this export is a global or nil otherwise
69func (e *Extern) Global() *Global {
70 ptr := e.ptr()
71 if ptr.kind != C.WASMTIME_EXTERN_GLOBAL {
72 return nil
73 }
74 ret := mkGlobal(C.go_wasmtime_extern_global_get(ptr))
75 runtime.KeepAlive(e)
76 return ret
77}
78
79// Memory returns a Memory if this export is a memory or nil otherwise
80func (e *Extern) Memory() *Memory {

Callers 2

TestInstanceFunction · 0.80
ExampleVal_ExternrefFunction · 0.80

Calls 2

ptrMethod · 0.95
mkGlobalFunction · 0.85

Tested by 2

TestInstanceFunction · 0.64
ExampleVal_ExternrefFunction · 0.64