From: Peter van Dijk Date: Tue, 2 Aug 2022 12:48:50 +0000 (+0200) Subject: rename s_LUA to LUA where it is not a static X-Git-Tag: auth-4.8.0-alpha0~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11760%2Fhead;p=thirdparty%2Fpdns.git rename s_LUA to LUA where it is not a static --- diff --git a/pdns/lua-auth4.hh b/pdns/lua-auth4.hh index 62e9646227..06ad247b60 100644 --- a/pdns/lua-auth4.hh +++ b/pdns/lua-auth4.hh @@ -43,4 +43,4 @@ private: luacall_prequery_t d_prequery; }; std::vector> luaSynth(const std::string& code, const DNSName& qname, - const DNSName& zone, int zoneid, const DNSPacket& dnsp, uint16_t qtype, unique_ptr& s_LUA); + const DNSName& zone, int zoneid, const DNSPacket& dnsp, uint16_t qtype, unique_ptr& LUA); diff --git a/pdns/lua-record.cc b/pdns/lua-record.cc index 9a081899cf..ebbda12237 100644 --- a/pdns/lua-record.cc +++ b/pdns/lua-record.cc @@ -1095,17 +1095,17 @@ static void setupLuaRecords(LuaContext& lua) }); } -std::vector> luaSynth(const std::string& code, const DNSName& query, const DNSName& zone, int zoneid, const DNSPacket& dnsp, uint16_t qtype, unique_ptr& s_LUA) +std::vector> luaSynth(const std::string& code, const DNSName& query, const DNSName& zone, int zoneid, const DNSPacket& dnsp, uint16_t qtype, unique_ptr& LUA) { - if(!s_LUA || // we don't have a Lua state yet + if(!LUA || // we don't have a Lua state yet !g_LuaRecordSharedState) { // or we want a new one even if we had one - s_LUA = make_unique(); - setupLuaRecords(*s_LUA->getLua()); + LUA = make_unique(); + setupLuaRecords(*LUA->getLua()); } std::vector> ret; - LuaContext& lua = *s_LUA->getLua(); + LuaContext& lua = *LUA->getLua(); s_lua_record_ctx = std::make_unique(); s_lua_record_ctx->qname = query;