diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-11-07 18:42:19 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-11-07 18:42:19 +0000 |
commit | e29fd4d0ead4353ff2e03fcd793400d8e0779481 (patch) | |
tree | de0d47e86f816ea6cfca63ab8b394c09daf0725a /plugins/MirLua/src/mlua_utils.cpp | |
parent | a50edcaccf9c335a8b4fd6dc144916f3aed9ca8f (diff) |
MirLua: added metatables wrapper
git-svn-id: http://svn.miranda-ng.org/main/trunk@15697 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_utils.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_utils.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp index 558652ef35..9bfa298cca 100644 --- a/plugins/MirLua/src/mlua_utils.cpp +++ b/plugins/MirLua/src/mlua_utils.cpp @@ -119,10 +119,11 @@ LPARAM luaM_tolparam(lua_State *L, int idx) int luaM_totable(lua_State *L)
{
- const char *tname = luaL_checkstring(L, -1);
+ const char *tname = luaL_checkstring(L, 2);
- luaL_getmetatable(L, tname);
- lua_getfield(L, -1, "__init");
+ //luaL_getmetatable(L, tname);
+ //lua_getfield(L, -1, "__init");
+ lua_getglobal(L, tname);
lua_pushvalue(L, 1);
if (lua_pcall(L, 1, 1, 0))
CallService(MS_NETLIB_LOG, (WPARAM)hNetlib, (LPARAM)lua_tostring(L, -1));
@@ -133,9 +134,7 @@ int luaM_totable(lua_State *L) void ShowNotification(const char *caption, const char *message, int flags, MCONTACT hContact)
{
if (Miranda_Terminated())
- {
return;
- }
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
{
|