From f155980e50b5670593eb0857a061d16f708a362f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 25 Nov 2015 18:17:36 +0000 Subject: MirLua: removed needless stuff git-svn-id: http://svn.miranda-ng.org/main/trunk@15778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua.cpp | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) (limited to 'plugins/MirLua/src/mlua.cpp') diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index c55cbe57f7..5a17246a5f 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -1,8 +1,8 @@ #include "stdafx.h" -LIST CMLua::Hooks(1, PtrKeySortT); -LIST CMLua::Events(1, PtrKeySortT); -LIST CMLua::Services(1, PtrKeySortT); +//LIST CMLua::Hooks(1, PtrKeySortT); +//LIST CMLua::Events(1, PtrKeySortT); +//LIST CMLua::Services(1, PtrKeySortT); LIST CMLua::HookRefs(1, HandleKeySortT); LIST CMLua::ServiceRefs(1, HandleKeySortT); @@ -73,30 +73,16 @@ void CMLua::Unload() ::KillModuleHotkeys(hScriptsLangpack); ::KillObjectEventHooks(L); ::KillObjectServices(L); - CMLua::KillModuleServices(); - CMLua::KillModuleEventHooks(); //KillModuleSubclassing + //CMLua::KillLuaRefs(); + if (L) lua_close(L); } -void CMLua::KillModuleEventHooks() +void CMLua::KillLuaRefs() { - while (Hooks.getCount()) - { - HANDLE hHook = Hooks[0]; - Hooks.remove(0); - UnhookEvent(hHook); - } - - while (Events.getCount()) - { - HANDLE hEvent = Events[0]; - Events.remove(hEvent); - DestroyHookableEvent(hEvent); - } - while (HookRefs.getCount()) { HandleRefParam *param = (HandleRefParam*)HookRefs[0]; @@ -107,16 +93,6 @@ void CMLua::KillModuleEventHooks() delete param; } } -} - -void CMLua::KillModuleServices() -{ - while (Services.getCount()) - { - HANDLE hService = Services[0]; - Services.remove(0); - DestroyServiceFunction(hService); - } while (ServiceRefs.getCount()) { -- cgit v1.2.3