mirror of https://github.com/axmolengine/axmol.git
Properly set gc mode for lua-5.4 [ci build]
This commit is contained in:
parent
2a10e85122
commit
19ef72f788
|
@ -94,6 +94,11 @@ namespace {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lua_version(lua_State* L) {
|
||||||
|
lua_pushinteger(L, LUA_VERSION_NUM);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
@ -132,6 +137,7 @@ bool LuaStack::init()
|
||||||
const luaL_Reg global_functions [] = {
|
const luaL_Reg global_functions [] = {
|
||||||
{"print", lua_print},
|
{"print", lua_print},
|
||||||
{"release_print",lua_release_print},
|
{"release_print",lua_release_print},
|
||||||
|
{"version", lua_version},
|
||||||
{nullptr, nullptr}
|
{nullptr, nullptr}
|
||||||
};
|
};
|
||||||
luaL_register(_state, "_G", global_functions);
|
luaL_register(_state, "_G", global_functions);
|
||||||
|
|
Loading…
Reference in New Issue