Refactor(builtins): Move luaopen_builtins from linit to lcmd

This commit is contained in:
Cormac Shannon
2026-03-20 23:16:00 +00:00
parent 4c23bc6d87
commit fbb7b441c3
2 changed files with 1 additions and 2 deletions

1
lcmd.c
View File

@@ -1296,5 +1296,6 @@ LUAMOD_API int luaopen_lush (lua_State *L) {
/* store in registry for OP_LUSH access */
lua_pushvalue(L, -1);
lua_rawseti(L, LUA_REGISTRYINDEX, LUA_RIDX_LUSH);
luaopen_builtins(L); /* register builtins in lush table */
return 1;
}

View File

@@ -21,7 +21,6 @@
#include "lauxlib.h"
#include "llimits.h"
#include "lcmd.h"
#include "lbuiltin.h"
/*
@@ -64,6 +63,5 @@ LUALIB_API void luaL_openselectedlibs (lua_State *L, int load, int preload) {
}
lua_assert((mask >> 1) == LUA_LUSHLIBK);
lua_pop(L, 1); /* remove PRELOAD table */
luaopen_builtins(L); /* register builtins in lush table */
}