Remove the element at the given valid index, shifting down the elements above index to fill the gap. This function cannot be called with a pseudo-index, because a pseudo-index is not an actual stack position. http://www.lua.org/manual/5.2/manual.html#lua_remove
(index int)
| 577 | // |
| 578 | // http://www.lua.org/manual/5.2/manual.html#lua_remove |
| 579 | func (l *State) Remove(index int) { |
| 580 | apiCheckStackIndex(index, l.indexToValue(index)) |
| 581 | i := l.callInfo.function + l.AbsIndex(index) |
| 582 | copy(l.stack[i:l.top-1], l.stack[i+1:l.top]) |
| 583 | l.top-- |
| 584 | } |
| 585 | |
| 586 | // Insert moves the top element into the given valid index, shifting up the |
| 587 | // elements above this index to open space. This function cannot be called |