summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-03-01 17:40:15 +0100
committerMattes D <github@xoft.cz>2016-06-27 20:51:50 +0200
commita4737251215461c3d624bcd366785a3e8d36b1f1 (patch)
treea7aa238e90992f149db7fe87b820e1555775fc08 /src/Bindings/PluginLua.cpp
parentChanged world tasks to use cLuaState::cCallback. (diff)
downloadcuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.tar
cuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.tar.gz
cuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.tar.bz2
cuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.tar.lz
cuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.tar.xz
cuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.tar.zst
cuberite-a4737251215461c3d624bcd366785a3e8d36b1f1.zip
Diffstat (limited to 'src/Bindings/PluginLua.cpp')
-rw-r--r--src/Bindings/PluginLua.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index a293cf741..fd3e8bc69 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -60,7 +60,6 @@ void cPluginLua::Close(void)
// If already closed, bail out:
if (!m_LuaState.IsValid())
{
- ASSERT(m_Resettables.empty());
ASSERT(m_HookMap.empty());
return;
}
@@ -70,18 +69,6 @@ void cPluginLua::Close(void)
ClearConsoleCommands();
ClearWebTabs();
- // Notify and remove all m_Resettables (unlock the m_CriticalSection while resetting them):
- cResettablePtrs resettables;
- std::swap(m_Resettables, resettables);
- {
- cCSUnlock Unlock(Lock);
- for (auto resettable: resettables)
- {
- resettable->Reset();
- }
- m_Resettables.clear();
- } // cCSUnlock (m_CriticalSection)
-
// Release all the references in the hook map:
m_HookMap.clear();
@@ -1244,16 +1231,6 @@ int cPluginLua::CallFunctionFromForeignState(
-void cPluginLua::AddResettable(cPluginLua::cResettablePtr a_Resettable)
-{
- cCSLock Lock(m_CriticalSection);
- m_Resettables.push_back(a_Resettable);
-}
-
-
-
-
-
void cPluginLua::BindCommand(const AString & a_Command, int a_FnRef)
{
ASSERT(m_Commands.find(a_Command) == m_Commands.end());
@@ -1322,25 +1299,3 @@ void cPluginLua::ClearWebTabs(void)
-
-////////////////////////////////////////////////////////////////////////////////
-// cPluginLua::cResettable:
-
-cPluginLua::cResettable::cResettable(cPluginLua & a_Plugin):
- m_Plugin(&a_Plugin)
-{
-}
-
-
-
-
-
-void cPluginLua::cResettable::Reset(void)
-{
- cCSLock Lock(m_CSPlugin);
- m_Plugin = nullptr;
-}
-
-
-
-