Exemplo n.º 1
0
// Ensures that there are at least extra free stack slots in the stack. It
// returns false if it cannot grow the stack to that size. This function
// never shrinks the stack; if the stack is already larger than the new
// size, it is left unchanged.
func (this *State) Checkstack(extra int) bool {
	return int(C.lua_checkstack(this.luastate, C.int(extra))) == 1
}
Exemplo n.º 2
0
Arquivo: lua.go Projeto: szll/golua
// lua_checkstack
func (L *State) CheckStack(extra int) bool {
	return C.lua_checkstack(L.s, C.int(extra)) != 0
}
Exemplo n.º 3
0
// Ensures that there are at least extra free stack slots in the stack. It
// returns false if it cannot grow the stack to that size. This function
// never shrinks the stack; if the stack is already larger than the new
// size, it is left unchanged.
func (s *State) Checkstack(extra int) bool {
	return int(C.lua_checkstack(s.l, C.int(extra))) == 1
}