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

Method Field

lua.go:996–1000  ·  view source on GitHub ↗

Field pushes onto the stack the value table[name], where table is the table on the stack at the given index. This call may trigger a metamethod for the __index event. http://www.lua.org/manual/5.2/manual.html#lua_getfield

(index int, name string)

Source from the content-addressed store, hash-verified

994//
995// http://www.lua.org/manual/5.2/manual.html#lua_getfield
996func (l *State) Field(index int, name string) {
997 t := l.indexToValue(index)
998 l.apiPush(name)
999 l.stack[l.top-1] = l.tableAt(t, l.stack[l.top-1])
1000}
1001
1002// RawGet is similar to GetTable, but does a raw access (without metamethods).
1003//

Callers 13

TestLuaFunction · 0.95
ioFileFunction · 0.80
ioFileHelperFunction · 0.80
closeFunction · 0.80
io.goFile · 0.80
findLoaderFunction · 0.80
findFileFunction · 0.80
searcherPreloadFunction · 0.80
noEnvFunction · 0.80
PackageOpenFunction · 0.80
MetaTableNamedFunction · 0.80
SubTableFunction · 0.80

Calls 3

indexToValueMethod · 0.95
apiPushMethod · 0.95
tableAtMethod · 0.95

Tested by 1

TestLuaFunction · 0.76