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

Method GetGlobal

state.go:1940–1942  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

1938}
1939
1940func (ls *LState) GetGlobal(name string) LValue {
1941 return ls.GetField(ls.Get(GlobalsIndex), name)
1942}
1943
1944func (ls *LState) SetGlobal(name string, value LValue) {
1945 ls.SetField(ls.Get(GlobalsIndex), name, value)

Callers 7

TestPCallFunction · 0.45
TestCoroutineApi1Function · 0.45
TestContextWithCroutineFunction · 0.45
TestChannelMakeFunction · 0.45
TestChannelSelect1Function · 0.45

Calls 2

GetFieldMethod · 0.95
GetMethod · 0.95

Tested by 7

TestPCallFunction · 0.36
TestCoroutineApi1Function · 0.36
TestContextWithCroutineFunction · 0.36
TestChannelMakeFunction · 0.36
TestChannelSelect1Function · 0.36