Global returns a Global if this export is a global or nil otherwise
()
| 67 | |
| 68 | // Global returns a Global if this export is a global or nil otherwise |
| 69 | func (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 |
| 80 | func (e *Extern) Memory() *Memory { |