#include"lua.hpp"
#include<iostream>
using namespace std;
void showStack(lua_State* st)
{
int size = lua_gettop(st);
cout << "=================== top ===================" << endl;
while (size>0)
{
string value = lua_isstring(st, size) ? lua_tostring(st, size) : "table";
if (lua_isfunction(st, size)) {
value = "function";
}
else if(lua_istable(st,size)) {
value = "table";
}
cout << "index:" << size << "|| value::" << value << endl;
size--;
}
cout
cppAndLua
最新推荐文章于 2023-02-09 21:34:25 发布