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

Method GetUpvalue

state.go:1837–1847  ·  view source on GitHub ↗
(fn *LFunction, no int)

Source from the content-addressed store, hash-verified

1835}
1836
1837func (ls *LState) GetUpvalue(fn *LFunction, no int) (string, LValue) {
1838 if fn.IsG {
1839 return "", LNil
1840 }
1841
1842 no--
1843 if no >= 0 && no < len(fn.Upvalues) {
1844 return fn.Proto.DbgUpvalues[no], fn.Upvalues[no].Value()
1845 }
1846 return "", LNil
1847}
1848
1849func (ls *LState) SetUpvalue(fn *LFunction, no int, lv LValue) string {
1850 if fn.IsG {

Callers 1

debugGetUpvalueFunction · 0.45

Calls 1

ValueMethod · 0.80

Tested by

no test coverage detected