Golang C.lua_checkstack类(方法)实例源码

下面列出了Golang C.lua_checkstack 类(方法)源码代码实例,从而了解它的用法。

作者:rdlaitil    项目:lea   
// 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
}

作者:szl    项目:golu   
// lua_checkstack
func (L *State) CheckStack(extra int) bool {
	return C.lua_checkstack(L.s, C.int(extra)) != 0
}

作者:halturi    项目:luaji   
// 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
}


问题


面经


文章

微信
公众号

扫码关注公众号