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

Method RawSet

lua.go:1108–1114  ·  view source on GitHub ↗

RawSet is similar to SetTable, but does a raw assignment (without metamethods). http://www.lua.org/manual/5.2/manual.html#lua_rawset

(index int)

Source from the content-addressed store, hash-verified

1106//
1107// http://www.lua.org/manual/5.2/manual.html#lua_rawset
1108func (l *State) RawSet(index int) {
1109 l.checkElementCount(2)
1110 t := l.indexToValue(index).(*table)
1111 t.put(l, l.stack[l.top-2], l.stack[l.top-1])
1112 t.invalidateTagMethodCache()
1113 l.top -= 2
1114}
1115
1116// RawSetInt does the equivalent of table[n]=v where table is the table at
1117// index and v is the value at the top of the stack.

Callers 2

debug.goFile · 0.80
base.goFile · 0.80

Calls 4

checkElementCountMethod · 0.95
indexToValueMethod · 0.95
putMethod · 0.80

Tested by

no test coverage detected