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

Method Replace

lua.go:605–609  ·  view source on GitHub ↗

Replace moves the top element into the given valid index without shifting any element (therefore replacing the value at the given index), and then pops the top element. http://www.lua.org/manual/5.2/manual.html#lua_replace

(index int)

Source from the content-addressed store, hash-verified

603//
604// http://www.lua.org/manual/5.2/manual.html#lua_replace
605func (l *State) Replace(index int) {
606 l.checkElementCount(1)
607 l.move(index, l.stack[l.top-1])
608 l.top--
609}
610
611// CheckStack ensures that there are at least size free stack slots in the
612// stack. This call will not panic(), unlike the other Check*() functions.

Callers 6

finishProtectedCallFunction · 0.80
base.goFile · 0.80
table.goFile · 0.80
io.goFile · 0.80
searchPathFunction · 0.80
setPathFunction · 0.80

Calls 2

checkElementCountMethod · 0.95
moveMethod · 0.95

Tested by

no test coverage detected