Added compiler option LUA_NODEBUGLIB to make Lua with no open debug
library + small improvements in the manual.
This commit is contained in:
Roberto I
2026-04-21 15:27:22 -03:00
parent d0bd25d2e7
commit 0c16a42d61
2 changed files with 21 additions and 11 deletions

8
lua.c
View File

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