From 0c16a42d61d08266033ff63bc5dfade6312b7359 Mon Sep 17 00:00:00 2001 From: Roberto I Date: Tue, 21 Apr 2026 15:27:22 -0300 Subject: Details Added compiler option LUA_NODEBUGLIB to make Lua with no open debug library + small improvements in the manual. --- lua.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 3107a674..858a04c0 100644 --- a/lua.c +++ b/lua.c @@ -714,7 +714,13 @@ static void doREPL (lua_State *L) { /* }================================================================== */ #if !defined(luai_openlibs) -#define luai_openlibs(L) luaL_openselectedlibs(L, ~0, 0) +#if defined(LUA_NODEBUGLIB) +/* With this option, code must require the debug library before using it */ +#define luai_openlibs(L) luaL_openselectedlibs(L, ~LUA_DBLIBK, LUA_DBLIBK) +#else +/* The default is to open all standard libraries */ +#define luai_openlibs(L) luaL_openselectedlibs(L, ~0, 0) +#endif #endif -- cgit v1.2.3-55-g6feb