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

Function tableInsert

tablelib.go:85–98  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

83}
84
85func tableInsert(L *LState) int {
86 tbl := L.CheckTable(1)
87 nargs := L.GetTop()
88 if nargs == 1 {
89 L.RaiseError("wrong number of arguments")
90 }
91
92 if L.GetTop() == 2 {
93 tbl.Append(L.Get(2))
94 return 0
95 }
96 tbl.Insert(int(L.CheckInt(2)), L.CheckAny(3))
97 return 0
98}
99
100//

Callers

nothing calls this directly

Calls 8

CheckTableMethod · 0.80
AppendMethod · 0.80
CheckIntMethod · 0.80
CheckAnyMethod · 0.80
GetTopMethod · 0.45
RaiseErrorMethod · 0.45
GetMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…