Move _LUSH_VERSION global into luaopen_base alongside _VERSION
This commit is contained in:
@@ -540,6 +540,7 @@ static const luaL_Reg base_funcs[] = {
|
||||
/* placeholders */
|
||||
{LUA_GNAME, NULL},
|
||||
{"_VERSION", NULL},
|
||||
{"_LUSH_VERSION", NULL},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -554,6 +555,9 @@ LUAMOD_API int luaopen_base (lua_State *L) {
|
||||
/* set global _VERSION */
|
||||
lua_pushliteral(L, LUA_VERSION);
|
||||
lua_setfield(L, -2, "_VERSION");
|
||||
/* set global _LUSH_VERSION */
|
||||
lua_pushliteral(L, LUSH_VERSION);
|
||||
lua_setfield(L, -2, "_LUSH_VERSION");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user