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

Method SetGlobal

state.go:1944–1946  ·  view source on GitHub ↗
(name string, value LValue)

Source from the content-addressed store, hash-verified

1942}
1943
1944func (ls *LState) SetGlobal(name string, value LValue) {
1945 ls.SetField(ls.Get(GlobalsIndex), name, value)
1946}
1947
1948func (ls *LState) Next(tb *LTable, key LValue) (LValue, LValue) {
1949 return tb.Next(key)

Callers 12

RegisterMethod · 0.95
OpenBaseFunction · 0.45
TestGetAndReplaceFunction · 0.45
TestLocalVarFreeFunction · 0.45
TestChannelSelect1Function · 0.45
TestChannelSelect2Function · 0.45
TestChannelSelect3Function · 0.45
TestChannelSelect4Function · 0.45
TestChannelSendReceive1Function · 0.45
TestCancelChannelReceiveFunction · 0.45
mainAuxFunction · 0.45

Calls 2

SetFieldMethod · 0.95
GetMethod · 0.95

Tested by 9

TestGetAndReplaceFunction · 0.36
TestLocalVarFreeFunction · 0.36
TestChannelSelect1Function · 0.36
TestChannelSelect2Function · 0.36
TestChannelSelect3Function · 0.36
TestChannelSelect4Function · 0.36
TestChannelSendReceive1Function · 0.36
TestCancelChannelReceiveFunction · 0.36