summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaTCPLink.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/LuaTCPLink.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 '')
-rw-r--r--src/Bindings/LuaTCPLink.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Bindings/LuaTCPLink.h b/src/Bindings/LuaTCPLink.h
index c8ae776fe..b8c886ef8 100644
--- a/src/Bindings/LuaTCPLink.h
+++ b/src/Bindings/LuaTCPLink.h
@@ -10,8 +10,8 @@
#pragma once
#include "../OSSupport/Network.h"
-#include "PluginLua.h"
#include "../PolarSSL++/SslContext.h"
+#include "LuaState.h"
@@ -30,11 +30,11 @@ class cLuaTCPLink:
public cTCPLink::cCallbacks
{
public:
- /** Creates a new instance of the link, attached to the specified plugin and wrapping the callbacks that are in a table at the specified stack pos. */
- cLuaTCPLink(cPluginLua & a_Plugin, int a_CallbacksTableStackPos);
+ /** Creates a new instance of the link, wrapping the callbacks that are in the specified table. */
+ cLuaTCPLink(cLuaState::cTableRefPtr && a_Callbacks);
/** Creates a new instance of the link, attached to the specified plugin and wrapping the callbacks that are in the specified referenced table. */
- cLuaTCPLink(cPluginLua & a_Plugin, cLuaState::cRef && a_CallbacksTableRef, cLuaServerHandleWPtr a_Server);
+ cLuaTCPLink(cLuaState::cTableRefPtr && a_Callbacks, cLuaServerHandleWPtr a_Server);
~cLuaTCPLink();
@@ -139,11 +139,8 @@ protected:
};
- /** The plugin for which the link is created. */
- cPluginLua & m_Plugin;
-
/** The Lua table that holds the callbacks to be invoked. */
- cLuaState::cRef m_Callbacks;
+ cLuaState::cTableRefPtr m_Callbacks;
/** The underlying link representing the connection.
May be nullptr. */