summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaNameLookup.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-14 09:51:37 +0200
committerGitHub <noreply@github.com>2016-08-14 09:51:37 +0200
commit0a58d1de583dafd8d81251f2f5ac23159726990b (patch)
tree68f7279d31a2147962db6b26cab6554ac262a198 /src/Bindings/LuaNameLookup.h
parentRevert "Added a BasicStyleCheck for virtual functions without override keyword." (diff)
parentIPLookup: Fixed a soft memory leak when looking up invalid IPs. (diff)
downloadcuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.tar
cuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.tar.gz
cuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.tar.bz2
cuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.tar.lz
cuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.tar.xz
cuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.tar.zst
cuberite-0a58d1de583dafd8d81251f2f5ac23159726990b.zip
Diffstat (limited to 'src/Bindings/LuaNameLookup.h')
-rw-r--r--src/Bindings/LuaNameLookup.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Bindings/LuaNameLookup.h b/src/Bindings/LuaNameLookup.h
index e4cdb9f53..0eef108c8 100644
--- a/src/Bindings/LuaNameLookup.h
+++ b/src/Bindings/LuaNameLookup.h
@@ -10,7 +10,7 @@
#pragma once
#include "../OSSupport/Network.h"
-#include "PluginLua.h"
+#include "LuaState.h"
@@ -21,15 +21,12 @@ class cLuaNameLookup:
{
public:
/** Creates a new instance of the lookup callbacks for the specified query,
- attached to the specified lua plugin and wrapping the callbacks that are in a table at the specified stack pos. */
- cLuaNameLookup(const AString & a_Query, cPluginLua & a_Plugin, int a_CallbacksTableStackPos);
+ using the callbacks that are in the specified table. */
+ cLuaNameLookup(const AString & a_Query, cLuaState::cTableRefPtr && a_Callbacks);
protected:
- /** The plugin for which the query is created. */
- cPluginLua & m_Plugin;
-
/** The Lua table that holds the callbacks to be invoked. */
- cLuaState::cRef m_Callbacks;
+ cLuaState::cTableRefPtr m_Callbacks;
/** The query used to start the lookup (either hostname or IP). */
AString m_Query;