MCPcopy Index your code
hub / github.com/yuin/gopher-lua / newLTable

Function newLTable

table.go:31–47  ·  view source on GitHub ↗
(acap int, hcap int)

Source from the content-addressed store, hash-verified

29}
30
31func newLTable(acap int, hcap int) *LTable {
32 if acap < 0 {
33 acap = 0
34 }
35 if hcap < 0 {
36 hcap = 0
37 }
38 tb := &LTable{}
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.
50func (tb *LTable) Len() int {

Callers 15

TestTableNewLTableFunction · 0.85
TestTableLenFunction · 0.85
TestTableAppendFunction · 0.85
TestTableInsertFunction · 0.85
TestTableMaxNFunction · 0.85
TestTableRemoveFunction · 0.85
TestTableRawSetIntFunction · 0.85
TestTableRawSetHFunction · 0.85
TestTableRawGetHFunction · 0.85
TestTableForEachFunction · 0.85
initFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by 10

TestTableNewLTableFunction · 0.68
TestTableLenFunction · 0.68
TestTableAppendFunction · 0.68
TestTableInsertFunction · 0.68
TestTableMaxNFunction · 0.68
TestTableRemoveFunction · 0.68
TestTableRawSetIntFunction · 0.68
TestTableRawSetHFunction · 0.68
TestTableRawGetHFunction · 0.68
TestTableForEachFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…