本文整理匯總了Golang中C.lua_checkstack函數的典型用法代碼示例。如果您正苦於以下問題:Golang lua_checkstack函數的具體用法?Golang lua_checkstack怎麽用?Golang lua_checkstack使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了lua_checkstack函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Checkstack
// 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
}
示例2: CheckStack
// lua_checkstack
func (L *State) CheckStack(extra int) bool {
return C.lua_checkstack(L.s, C.int(extra)) != 0
}
示例3: Checkstack
// 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
}