MCPcopy Index your code
hub / github.com/Shopify/go-lua / Global

Method Global

lua.go:985–989  ·  view source on GitHub ↗

Global pushes onto the stack the value of the global name. http://www.lua.org/manual/5.2/manual.html#lua_getglobal

(name string)

Source from the content-addressed store, hash-verified

983//
984// http://www.lua.org/manual/5.2/manual.html#lua_getglobal
985func (l *State) Global(name string) {
986 g := l.global.registry.atInt(RegistryIndexGlobals)
987 l.push(name)
988 l.stack[l.top-1] = l.tableAt(g, l.stack[l.top-1])
989}
990
991// Field pushes onto the stack the value table[name], where table is the
992// table on the stack at the given index. This call may trigger a

Callers 2

TestLuaFunction · 0.95
base.goFile · 0.80

Calls 3

pushMethod · 0.95
tableAtMethod · 0.95
atIntMethod · 0.80

Tested by 1

TestLuaFunction · 0.76