summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_script.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-04-04 09:44:12 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-04-04 09:44:12 +0000
commit32089106fa10eba08e946693cb2939a4ab293f77 (patch)
tree102d714e16eb4d5c8da2a6a34d497ad10724c35f /plugins/MirLua/src/mlua_script.cpp
parente1110157f8c2989a58aa12ddeef91669525d188f (diff)
MirLua:
- no need to copy pointer data in MT - project cleanup - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@16584 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_script.cpp')
-rw-r--r--plugins/MirLua/src/mlua_script.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp
index 9a0d840c0c..ce635a36cf 100644
--- a/plugins/MirLua/src/mlua_script.cpp
+++ b/plugins/MirLua/src/mlua_script.cpp
@@ -140,8 +140,7 @@ bool CMLuaScript::Load()
if (lua_isfunction(L, -1))
{
lua_pushvalue(L, -1);
- lua_rawsetp(L, LUA_REGISTRYINDEX, this);
- //unloadRef = luaL_ref(L, LUA_REGISTRYINDEX);
+ unloadRef = luaL_ref(L, LUA_REGISTRYINDEX);
}
lua_pop(L, 1);
@@ -154,8 +153,7 @@ void CMLuaScript::Unload()
{
if (status == Loaded)
{
- lua_rawgetp(L, LUA_REGISTRYINDEX, this);
- //lua_rawgeti(L, LUA_REGISTRYINDEX, unloadRef);
+ lua_rawgeti(L, LUA_REGISTRYINDEX, unloadRef);
if (lua_isfunction(L, -1))
luaM_pcall(L);
lua_pushnil(L);
@@ -168,9 +166,6 @@ void CMLuaScript::Unload()
lua_setfield(L, -2, moduleName);
lua_pop(L, 1);
- //lua_pushnil(L);
- //lua_setglobal(L, moduleName);
-
KillModuleIcons(id);
KillModuleSounds(id);
KillModuleMenus(id);