Table returns a Table if this export is a table or nil otherwise
()
| 89 | |
| 90 | // Table returns a Table if this export is a table or nil otherwise |
| 91 | func (e *Extern) Table() *Table { |
| 92 | ptr := e.ptr() |
| 93 | if ptr.kind != C.WASMTIME_EXTERN_TABLE { |
| 94 | return nil |
| 95 | } |
| 96 | ret := mkTable(C.go_wasmtime_extern_table_get(ptr)) |
| 97 | runtime.KeepAlive(e) |
| 98 | return ret |
| 99 | } |
| 100 | |
| 101 | func (e *Extern) AsExtern() C.wasmtime_extern_t { |
| 102 | return *e.ptr() |