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

Method Less

table.go:20–29  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

18}
19
20func (lv lValueArraySorter) Less(i, j int) bool {
21 if lv.Fn != nil {
22 lv.L.Push(lv.Fn)
23 lv.L.Push(lv.Values[i])
24 lv.L.Push(lv.Values[j])
25 lv.L.Call(2, 1)
26 return LVAsBool(lv.L.reg.Pop())
27 }
28 return lessThan(lv.L, lv.Values[i], lv.Values[j])
29}
30
31func newLTable(acap int, hcap int) *LTable {
32 if acap < 0 {

Callers

nothing calls this directly

Calls 5

LVAsBoolFunction · 0.85
lessThanFunction · 0.70
PushMethod · 0.65
PopMethod · 0.65
CallMethod · 0.45

Tested by

no test coverage detected