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

Method SetUpvalue

state.go:1849–1860  ·  view source on GitHub ↗
(fn *LFunction, no int, lv LValue)

Source from the content-addressed store, hash-verified

1847}
1848
1849func (ls *LState) SetUpvalue(fn *LFunction, no int, lv LValue) string {
1850 if fn.IsG {
1851 return ""
1852 }
1853
1854 no--
1855 if no >= 0 && no < len(fn.Upvalues) {
1856 fn.Upvalues[no].SetValue(lv)
1857 return fn.Proto.DbgUpvalues[no]
1858 }
1859 return ""
1860}
1861
1862/* }}} */
1863

Callers 1

debugSetUpvalueFunction · 0.45

Calls 1

SetValueMethod · 0.80

Tested by

no test coverage detected