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

Function debugSetLocal

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

Source from the content-addressed store, hash-verified

112}
113
114func debugSetLocal(L *LState) int {
115 level := L.CheckInt(1)
116 idx := L.CheckInt(2)
117 value := L.CheckAny(3)
118 dbg, ok := L.GetStack(level)
119 if !ok {
120 L.ArgError(1, "level out of range")
121 }
122 name := L.SetLocal(dbg, idx, value)
123 if len(name) > 0 {
124 L.Push(LString(name))
125 } else {
126 L.Push(LNil)
127 }
128 return 1
129}
130
131func debugSetMetatable(L *LState) int {
132 L.CheckTypes(2, LTNil, LTTable)

Callers

nothing calls this directly

Calls 7

LStringTypeAlias · 0.85
CheckIntMethod · 0.80
CheckAnyMethod · 0.80
ArgErrorMethod · 0.80
PushMethod · 0.65
GetStackMethod · 0.45
SetLocalMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…