在Lua C API编程上,经常有一些博客会说,必须使用luaL_newmetatable ... __name = tname */ lua_pushvalue(L, -1); lua_setfield(L, LUA_REGISTRYINDEX, tname); ...
確定! 回上一頁