Memory returns a Memory if this export is a memory or nil otherwise
()
| 78 | |
| 79 | // Memory returns a Memory if this export is a memory or nil otherwise |
| 80 | func (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 |
| 91 | func (e *Extern) Table() *Table { |