From 2c2b13b63e510af16d3806843a022853f0740ed7 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 9 Jun 2015 16:16:16 +0000 Subject: 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 --- plugins/MirLua/src/mlua_core.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/MirLua/src/mlua_core.cpp') 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; +} -- cgit v1.2.3