Properly set gc mode for lua-5.4 [ci build]

This commit is contained in:
halx99 2021-03-27 19:49:06 +08:00
parent 2a10e85122
commit 19ef72f788
1 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,11 @@ namespace {
return 0;
}
int lua_version(lua_State* L) {
lua_pushinteger(L, LUA_VERSION_NUM);
return 1;
}
}
NS_CC_BEGIN
@ -132,6 +137,7 @@ bool LuaStack::init()
const luaL_Reg global_functions [] = {
{"print", lua_print},
{"release_print",lua_release_print},
{"version", lua_version},
{nullptr, nullptr}
};
luaL_register(_state, "_G", global_functions);