From bf549a24403d7753d9e736b185d40e5927bc3202 Mon Sep 17 00:00:00 2001 From: devsaurus Date: Sun, 4 Nov 2018 23:26:09 +0100 Subject: [PATCH] make ldblib.c compilable with extended debug support --- components/lua/ldblib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/lua/ldblib.c b/components/lua/ldblib.c index 1a25ffb1..b57512ce 100644 --- a/components/lua/ldblib.c +++ b/components/lua/ldblib.c @@ -301,6 +301,7 @@ static int db_gethook (lua_State *L) { } +#if defined(LUA_CROSS_COMPILER) static int db_debug (lua_State *L) { for (;;) { char buffer[LUA_MAXINPUT]; @@ -325,6 +326,7 @@ static int db_debug (lua_State *L) { lua_settop(L, 0); /* remove eventual returns */ } } +#endif // defined(LUA_CROSS_COMPILER) #endif #define LEVELS1 12 /* size of the first part of the stack */ @@ -387,7 +389,9 @@ static int db_errorfb (lua_State *L) { #include "lrodefs.h" const LUA_REG_TYPE dblib[] = { #ifndef CONFIG_LUA_BUILTIN_DEBUG_MINIMAL +#if defined(LUA_CROSS_COMPILER) {LSTRKEY("debug"), LFUNCVAL(db_debug)}, +#endif // defined(LUA_CROSS_COMPILER) {LSTRKEY("getfenv"), LFUNCVAL(db_getfenv)}, {LSTRKEY("gethook"), LFUNCVAL(db_gethook)}, {LSTRKEY("getinfo"), LFUNCVAL(db_getinfo)},