コード例 #1
0
ファイル: State.go プロジェクト: rdlaitila/leaf
// Moves the top element into the given valid index, shifting up the elements
// above this index to open space. Cannot be called with a pseudo-index,
// because a pseudo-index is not an actual stack position.
func (this *State) Insert(index int) {
	C.lua_rotate(this.luastate, C.int(index), C.int(1))
}
コード例 #2
0
ファイル: State.go プロジェクト: rdlaitila/leaf
// Removes the element at the given valid index, shifting down the elements
// above this index to fill the gap. Cannot be called with a pseudo-index,
// because a pseudo-index is not an actual stack position.
func (this *State) Remove(index int) {
	C.lua_rotate(this.luastate, C.int(index), -1)
	this.Pop(1)
}