(acap int, hcap int)
| 29 | } |
| 30 | |
| 31 | func newLTable(acap int, hcap int) *LTable { |
| 32 | if acap < 0 { |
| 33 | acap = 0 |
| 34 | } |
| 35 | if hcap < 0 { |
| 36 | hcap = 0 |
| 37 | } |
| 38 | tb := <able{} |
| 39 | tb.Metatable = LNil |
| 40 | if acap != 0 { |
| 41 | tb.array = make([]LValue, 0, acap) |
| 42 | } |
| 43 | if hcap != 0 { |
| 44 | tb.strdict = make(map[string]LValue, hcap) |
| 45 | } |
| 46 | return tb |
| 47 | } |
| 48 | |
| 49 | // Len returns length of this LTable without using __len. |
| 50 | func (tb *LTable) Len() int { |
no outgoing calls
searching dependent graphs…