Esempio 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
}
Esempio n. 2
0
File: lua.go Progetto: szll/golua
// lua_checkstack
func (L *State) CheckStack(extra int) bool {
	return C.lua_checkstack(L.s, C.int(extra)) != 0
}
Esempio 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
}