diff options
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;
+}
|