From fbb7b441c36f26aa0a17e5ddf0c313d30f450f5d Mon Sep 17 00:00:00 2001 From: Cormac Shannon <> Date: Fri, 20 Mar 2026 23:16:00 +0000 Subject: [PATCH] Refactor(builtins): Move luaopen_builtins from linit to lcmd --- lcmd.c | 1 + linit.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lcmd.c b/lcmd.c index ab4ba0b3..339e84bb 100644 --- a/lcmd.c +++ b/lcmd.c @@ -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; } diff --git a/linit.c b/linit.c index 0240c4b0..7d9b7bac 100644 --- a/linit.c +++ b/linit.c @@ -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 */ }