diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-10-23 22:27:49 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-10-23 22:27:49 +0000 |
commit | f4258bb6d37d16a673c268376e0dff1958c34f82 (patch) | |
tree | 071772b69092f7b095b5dc9e14e3a6ea18f85211 /plugins/MirLua/src/mlua_module_loader.cpp | |
parent | f9805e018525db5063d28692014e04dba47196db (diff) |
MirLua:
- m_core is available as usual module
- options page moved to Services/MirLua/Scripts
- code cleaning
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@15602 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_module_loader.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_module_loader.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/MirLua/src/mlua_module_loader.cpp b/plugins/MirLua/src/mlua_module_loader.cpp index 4e82793a61..a236a76691 100644 --- a/plugins/MirLua/src/mlua_module_loader.cpp +++ b/plugins/MirLua/src/mlua_module_loader.cpp @@ -14,9 +14,8 @@ void CLuaModuleLoader::PreloadModule(const char *name, lua_CFunction loader) void CLuaModuleLoader::LoadModules()
{
- // load core module
- luaopen_m(L);
// regirter delay loading of miranda modules
+ PreloadModule(MLUA_CORE, luaopen_m_core);
PreloadModule(MLUA_CLIST, luaopen_m_clist);
PreloadModule(MLUA_DATABASE, luaopen_m_database);
PreloadModule(MLUA_ICOLIB, luaopen_m_icolib);
@@ -29,6 +28,15 @@ void CLuaModuleLoader::LoadModules() PreloadModule(MLUA_TOPTOOLBAR, luaopen_m_toptoolbar);
PreloadModule(MLUA_VARIABLES, luaopen_m_variables);
PreloadModule(MLUA_WINDOWS, luaopen_m_windows);
+
+ // load m_core module
+ lua_pushglobaltable(L);
+ lua_getfield(L, -1, "require");
+ lua_pushstring(L, "m_core");
+ if (lua_pcall(L, 1, 1, 0))
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlib, (LPARAM)lua_tostring(L, -1));
+ lua_pop(L, 1);
+ lua_pop(L, 1);
}
void CLuaModuleLoader::Load(lua_State *L)
|