Maximum returns the maximum size, in elements, of this table. If no maximum size is listed then `(false, 0)` is returned, otherwise `(true, N)` is returned where `N` is the maximum size.
()
| 88 | // If no maximum size is listed then `(false, 0)` is returned, otherwise |
| 89 | // `(true, N)` is returned where `N` is the maximum size. |
| 90 | func (ty *TableType) Maximum() (bool, uint32) { |
| 91 | ptr := C.wasm_tabletype_limits(ty.ptr()) |
| 92 | ret := uint32(ptr.max) |
| 93 | runtime.KeepAlive(ty) |
| 94 | if ret == 0xffffffff { |
| 95 | return false, 0 |
| 96 | } else { |
| 97 | return true, ret |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | // AsExternType converts this type to an instance of `ExternType` |
| 102 | func (ty *TableType) AsExternType() *ExternType { |