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

Function debugGetLocal

debuglib.go:74–89  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

72}
73
74func debugGetLocal(L *LState) int {
75 level := L.CheckInt(1)
76 idx := L.CheckInt(2)
77 dbg, ok := L.GetStack(level)
78 if !ok {
79 L.ArgError(1, "level out of range")
80 }
81 name, value := L.GetLocal(dbg, idx)
82 if len(name) > 0 {
83 L.Push(LString(name))
84 L.Push(value)
85 return 2
86 }
87 L.Push(LNil)
88 return 1
89}
90
91func debugGetMetatable(L *LState) int {
92 L.Push(L.GetMetatable(L.CheckAny(1)))

Callers

nothing calls this directly

Calls 6

LStringTypeAlias · 0.85
CheckIntMethod · 0.80
ArgErrorMethod · 0.80
PushMethod · 0.65
GetStackMethod · 0.45
GetLocalMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…