From e16a1bf06cc246e7c1a37c261433ffecc5c80884 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sun, 18 Oct 2015 12:58:50 +0200 Subject: [PATCH] make sure luaStackDump() actually works (we trip over L..) --- pdns/lua-pdns.cc | 14 +++++++------- pdns/lua-pdns.hh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pdns/lua-pdns.cc b/pdns/lua-pdns.cc index e7c07dccd..87063360b 100644 --- a/pdns/lua-pdns.cc +++ b/pdns/lua-pdns.cc @@ -372,27 +372,27 @@ PowerDNSLua::~PowerDNSLua() } #if 0 -void luaStackDump (lua_State *L) { +void luaStackDump (lua_State *Lua) { int i; - int top = lua_gettop(L); + int top = lua_gettop(Lua); for (i = 1; i <= top; i++) { /* repeat for each level */ - int t = lua_type(L, i); + int t = lua_type(Lua, i); switch (t) { case LUA_TSTRING: /* strings */ - printf("`%s'", lua_tostring(L, i)); + printf("`%s'", lua_tostring(Lua, i)); break; case LUA_TBOOLEAN: /* booleans */ - printf(lua_toboolean(L, i) ? "true" : "false"); + printf(lua_toboolean(Lua, i) ? "true" : "false"); break; case LUA_TNUMBER: /* numbers */ - printf("%g", lua_tonumber(L, i)); + printf("%g", lua_tonumber(Lua, i)); break; default: /* other values */ - printf("%s", lua_typename(L, t)); + printf("%s", lua_typename(Lua, t)); break; } diff --git a/pdns/lua-pdns.hh b/pdns/lua-pdns.hh index f5a6ba5c7..07e394bc2 100644 --- a/pdns/lua-pdns.hh +++ b/pdns/lua-pdns.hh @@ -37,6 +37,6 @@ void pushResourceRecordsTable(lua_State* lua, const vector& records); void popResourceRecordsTable(lua_State *lua, const DNSName &query, vector& ret); void pushSyslogSecurityLevelTable(lua_State *lua); int getLuaTableLength(lua_State* lua, int depth); -void luaStackDump (lua_State *L); +void luaStackDump (lua_State *lua); extern "C" int luaopen_iputils(lua_State*); #endif -- 2.40.0