summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-01-17 22:38:04 +0100
committerMattes D <github@xoft.cz>2017-01-18 09:03:05 +0100
commit7cc3fb098df221f083da1d81d2327a0a5f22edf5 (patch)
treede9232cbf239800ea1e7a71cf52086509a9472ea /src/Bindings/PluginLua.cpp
parentDebuggers: Added a deadlock simulation command. (diff)
downloadcuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.tar
cuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.tar.gz
cuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.tar.bz2
cuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.tar.lz
cuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.tar.xz
cuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.tar.zst
cuberite-7cc3fb098df221f083da1d81d2327a0a5f22edf5.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/PluginLua.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index f2896abde..202477962 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -33,10 +33,12 @@ extern "C"
////////////////////////////////////////////////////////////////////////////////
// cPluginLua:
-cPluginLua::cPluginLua(const AString & a_PluginDirectory) :
+cPluginLua::cPluginLua(const AString & a_PluginDirectory, cDeadlockDetect & a_DeadlockDetect) :
cPlugin(a_PluginDirectory),
- m_LuaState(Printf("plugin %s", a_PluginDirectory.c_str()))
+ m_LuaState(Printf("plugin %s", a_PluginDirectory.c_str())),
+ m_DeadlockDetect(a_DeadlockDetect)
{
+ m_LuaState.TrackInDeadlockDetect(a_DeadlockDetect);
}
@@ -46,6 +48,7 @@ cPluginLua::cPluginLua(const AString & a_PluginDirectory) :
cPluginLua::~cPluginLua()
{
Close();
+ m_LuaState.UntrackInDeadlockDetect(m_DeadlockDetect);
}