summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_core.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-10-23 22:27:49 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-10-23 22:27:49 +0000
commitf4258bb6d37d16a673c268376e0dff1958c34f82 (patch)
tree071772b69092f7b095b5dc9e14e3a6ea18f85211 /plugins/MirLua/src/m_core.cpp
parentf9805e018525db5063d28692014e04dba47196db (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/m_core.cpp')
-rw-r--r--plugins/MirLua/src/m_core.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp
index b2f6beda2a..b3c5afc73f 100644
--- a/plugins/MirLua/src/m_core.cpp
+++ b/plugins/MirLua/src/m_core.cpp
@@ -260,14 +260,16 @@ luaL_Reg coreApi[] =
{ NULL, NULL }
};
-LUAMOD_API int luaopen_m(lua_State *L)
+LUAMOD_API int luaopen_m_core(lua_State *L)
{
luaL_newlib(L, coreApi);
lua_pushlightuserdata(L, NULL);
lua_setfield(L, -2, "NULL");
lua_pushlightuserdata(L, INVALID_HANDLE_VALUE);
lua_setfield(L, -2, "INVALID_HANDLE_VALUE");
- lua_setglobal(L, MLUA_CORE);
+ // set copy to global variable m
+ lua_pushvalue(L, -1);
+ lua_setglobal(L, "m");
return 1;
} \ No newline at end of file