Move _LUSH_VERSION global into luaopen_base alongside _VERSION

This commit is contained in:
Cormac Shannon
2026-03-23 19:01:50 +00:00
parent 0df1b50adf
commit cf8022c740
2 changed files with 4 additions and 2 deletions

View File

@@ -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;
}