首页 > 技术文章 > lua 栈操作 常用

hiker-online 2020-09-02 15:38 原文

(注:*为nil/boolean/number/integer/unsigned/string)
入栈:lua_push*
查询:lua_is*
取值:lua_to*
取栈元素个数:lua_gettop
设置栈大小 :lua_settop
入栈已有:lua_pushvalue
删除:lua_remove
顶元素移动:lua_insert
顶元素替换:lua_replace
顶元素copy: lua_copy
全局压栈:lua_getglobal
全局设置:lua_setglobal

 

参考:https://www.cnblogs.com/lsgxeva/p/11158228.html

推荐阅读