summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-06-23 13:01:49 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-06-23 13:01:49 +0000
commit50b6a5ca2c5652fdf4e5fab69d9918c0f633cfb5 (patch)
tree47d14db48369b7aac927ab77189ec842f4ef9373 /plugins/MirLua/src/mlua.cpp
parent1406bb2d649a561151ea9c44f2a3da54704d3ff7 (diff)
MirLua: reworked m_core and CMLuaScript
git-svn-id: http://svn.miranda-ng.org/main/trunk@17023 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r--plugins/MirLua/src/mlua.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp
index 2c67f32f3e..afe49d0f31 100644
--- a/plugins/MirLua/src/mlua.cpp
+++ b/plugins/MirLua/src/mlua.cpp
@@ -2,9 +2,6 @@
int hMLuaLangpack;
-LIST<void> CMLua::HookRefs(1, HandleKeySortT);
-LIST<void> CMLua::ServiceRefs(1, HandleKeySortT);
-
static int CompareScripts(const CMLuaScript* p1, const CMLuaScript* p2)
{
return mir_strcmpi(p1->GetModuleName(), p2->GetModuleName());
@@ -83,7 +80,7 @@ void CMLua::Unload()
{
CMLuaScript *script = g_mLua->Scripts[last - 1];
Scripts.remove(script);
- script->Unload();
+ script->Unload(L);
delete script;
}
@@ -97,28 +94,3 @@ void CMLua::Unload()
lua_close(L);
}
-
-void CMLua::KillLuaRefs()
-{
- while (HookRefs.getCount())
- {
- HandleRefParam *param = (HandleRefParam*)HookRefs[0];
- if (param != NULL)
- {
- luaL_unref(param->L, LUA_REGISTRYINDEX, param->ref);
- HookRefs.remove(0);
- delete param;
- }
- }
-
- while (ServiceRefs.getCount())
- {
- HandleRefParam *param = (HandleRefParam*)ServiceRefs[0];
- if (param != NULL)
- {
- luaL_unref(param->L, LUA_REGISTRYINDEX, param->ref);
- ServiceRefs.remove(0);
- delete param;
- }
- }
-}