diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-01-07 10:42:38 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-01-07 10:42:38 +0000 |
commit | 6a6a1d097e043dba142d5cdc485e6b4dbe67e12a (patch) | |
tree | 8b4700b62e3569fcc0906bf75bf79894dd1623e0 /plugins/MirLua/src/mlua.cpp | |
parent | 2742e2cfa0b0c32cbfc30e551f9ffaca29aa8aa9 (diff) |
MirLua:
- added script cache on load
- refactoring
git-svn-id: http://svn.miranda-ng.org/main/trunk@16044 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index dc0699182e..1dc4ef440d 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -10,6 +10,8 @@ static int CompareScripts(const CMLuaScript* p1, const CMLuaScript* p2) CMLua::CMLua() : L(NULL), Scripts(10, CompareScripts)
{
+ MUUID muidLast = MIID_LAST;
+ hLangpack = GetPluginLangId(muidLast, 0);
}
CMLua::~CMLua()
@@ -17,6 +19,11 @@ CMLua::~CMLua() Unload();
}
+const int CMLua::GetHLangpack() const
+{
+ return hLangpack;
+}
+
void CMLua::SetPaths()
{
TCHAR path[MAX_PATH];
@@ -53,9 +60,6 @@ void CMLua::Load() lua_atpanic(L, luaM_atpanic);
- MUUID muidLast = MIID_LAST;
- hScriptsLangpack = GetPluginLangId(muidLast, 0);
-
Log("Loading miranda modules");
CLuaModuleLoader::Load(L);
CLuaScriptLoader::Load(L);
@@ -77,10 +81,10 @@ void CMLua::Unload() ::KillModuleMBButtons();
::KillModuleTTBButton();
- ::KillModuleIcons(hScriptsLangpack);
- ::KillModuleSounds(hScriptsLangpack);
- ::KillModuleMenus(hScriptsLangpack);
- ::KillModuleHotkeys(hScriptsLangpack);
+ ::KillModuleIcons(hLangpack);
+ ::KillModuleSounds(hLangpack);
+ ::KillModuleMenus(hLangpack);
+ ::KillModuleHotkeys(hLangpack);
::KillObjectEventHooks(L);
::KillObjectServices(L);
|