From 50b6a5ca2c5652fdf4e5fab69d9918c0f633cfb5 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 23 Jun 2016 13:01:49 +0000 Subject: MirLua: reworked m_core and CMLuaScript git-svn-id: http://svn.miranda-ng.org/main/trunk@17023 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'plugins/MirLua/src/mlua.cpp') 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 CMLua::HookRefs(1, HandleKeySortT); -LIST 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; - } - } -} -- cgit v1.2.3