MCPcopy Create free account
hub / github.com/yuin/gopher-lua / GetUpvalue

Method GetUpvalue

_state.go:1624–1634  ·  view source on GitHub ↗
(fn *LFunction, no int)

Source from the content-addressed store, hash-verified

1622}
1623
1624func (ls *LState) GetUpvalue(fn *LFunction, no int) (string, LValue) {
1625 if fn.IsG {
1626 return "", LNil
1627 }
1628
1629 no--
1630 if no >= 0 && no < len(fn.Upvalues) {
1631 return fn.Proto.DbgUpvalues[no], fn.Upvalues[no].Value()
1632 }
1633 return "", LNil
1634}
1635
1636func (ls *LState) SetUpvalue(fn *LFunction, no int, lv LValue) string {
1637 if fn.IsG {

Callers

nothing calls this directly

Calls 1

ValueMethod · 0.80

Tested by

no test coverage detected