From a5e4d2be50ad50f639b7aabc6de7c115c435830e Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 2 Jan 2016 23:03:00 +0000 Subject: MirLua: - fixed m_schedule - massive function replace git-svn-id: http://svn.miranda-ng.org/main/trunk@16004 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_script.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src/mlua_script.cpp') diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp index 8eae3b4239..bfe827418b 100644 --- a/plugins/MirLua/src/mlua_script.cpp +++ b/plugins/MirLua/src/mlua_script.cpp @@ -50,15 +50,13 @@ bool CMLuaScript::Load() if (!lua_istable(L, -1)) return true; - lua_pushliteral(L, "Load"); - lua_gettable(L, -2); + lua_getfield(L, -1, "Load"); if (lua_isfunction(L, -1)) luaM_pcall(L); else lua_pop(L, 1); - lua_pushliteral(L, "Unload"); - lua_gettable(L, -2); + lua_getfield(L, -1, "Unload"); if (lua_isfunction(L, -1)) { lua_pushvalue(L, -1); -- cgit v1.2.3