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

Function debugGetUpvalue

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

Source from the content-addressed store, hash-verified

94}
95
96func debugGetUpvalue(L *LState) int {
97 fn := L.CheckFunction(1)
98 idx := L.CheckInt(2)
99 name, value := L.GetUpvalue(fn, idx)
100 if len(name) > 0 {
101 L.Push(LString(name))
102 L.Push(value)
103 return 2
104 }
105 L.Push(LNil)
106 return 1
107}
108
109func debugSetFEnv(L *LState) int {
110 L.SetFEnv(L.CheckAny(1), L.CheckAny(2))

Callers

nothing calls this directly

Calls 5

LStringTypeAlias · 0.85
CheckFunctionMethod · 0.80
CheckIntMethod · 0.80
PushMethod · 0.65
GetUpvalueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…