*Lua 数据类型
table={
{1,2,3},
{"1","2","3"},
}
C API 遍历table
lua_getglobal(L, t);//获取lua table
lua_pushnil(L);//压入nil 作为KEY
while (lua_next(L, -2)) {//
//多维table -1 table ,-2 key
lua_pushnil(L);//压入nil 作为KEY
while (lua_next(L, -2)) {//
//内层数组
/* 此时栈上 -1 处为 value, -2 处为 key */
lua_tostring(-1);
lua_pop(L, 1);//从栈中弹出 当前元素 让 table 在栈顶
}
lua_pop(L, 1);//从栈中弹出 当前元素 让 table 在栈顶
}
lua_pop(L, 1);//清空栈