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

Function tableSort

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

Source from the content-addressed store, hash-verified

20}
21
22func tableSort(L *LState) int {
23 tbl := L.CheckTable(1)
24 sorter := lValueArraySorter{L, nil, tbl.array}
25 if L.GetTop() != 1 {
26 sorter.Fn = L.CheckFunction(2)
27 }
28 sort.Sort(sorter)
29 return 0
30}
31
32func tableGetN(L *LState) int {
33 L.Push(LNumber(L.CheckTable(1).Len()))

Callers

nothing calls this directly

Calls 3

CheckTableMethod · 0.80
CheckFunctionMethod · 0.80
GetTopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…