diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-09 16:16:16 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-09 16:16:16 +0000 |
commit | 2c2b13b63e510af16d3806843a022853f0740ed7 (patch) | |
tree | 1d0a97401251ce0f5c47ee4083b7c259e9ffc49a /plugins/MirLua/src/mlua_core.cpp | |
parent | 31aeb2d24674a29ea5810a7e5e2e5a7d36bf3300 (diff) |
MirLua:
- added debug console
- added m_clist module
- added examples
git-svn-id: http://svn.miranda-ng.org/main/trunk@14079 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_core.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_core.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/MirLua/src/mlua_core.cpp b/plugins/MirLua/src/mlua_core.cpp index 7f1bd3cf48..cb80255eb7 100644 --- a/plugins/MirLua/src/mlua_core.cpp +++ b/plugins/MirLua/src/mlua_core.cpp @@ -135,7 +135,7 @@ static int lua_CallService(lua_State *L) return 1;
}
-luaL_Reg CMLua::coreFunctions[10] =
+static luaL_Reg coreLib[] =
{
{ "CreateHookableEvent", lua_CreateHookableEvent },
{ "DestroyHookableEvent", lua_DestroyHookableEvent },
@@ -153,3 +153,11 @@ luaL_Reg CMLua::coreFunctions[10] = { NULL, NULL }
};
+
+int CMLua::luaopen_m(lua_State *L)
+{
+ luaL_newlib(L, coreLib);
+ lua_setglobal(L, "M");
+
+ return 1;
+}
|