diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-10-21 18:29:50 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-10-21 18:29:50 +0000 |
commit | c99bbd2ef7f9fb2295ff2ec07bb690c4d7351a71 (patch) | |
tree | a760bc80000499732a80034d32bdd02cb3e9b885 /plugins/MirLua/src/mlua.cpp | |
parent | dd4878e302ae384f7b51b9ef60ff3a06dbd11a11 (diff) |
MirLua:
- added totable to cast userdata to metatable
- all modules hooks are marked as obsolete
- version bumb
git-svn-id: http://svn.miranda-ng.org/main/trunk@15586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index 6da603358d..15bd34fe2d 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -41,6 +41,8 @@ void CMLua::Load() lua_setfield(L, -2, "a");
lua_pushcclosure(L, luaM_toucs2, 0);
lua_setfield(L, -2, "u");
+ lua_pushcclosure(L, luaM_totable, 0);
+ lua_setfield(L, -2, "totable");
lua_pop(L, 1);
lua_atpanic(L, luaM_atpanic);
@@ -135,8 +137,8 @@ int CMLua::HookEventObjParam(void *obj, WPARAM wParam, LPARAM lParam, LPARAM par int ref = param;
lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
- lua_pushnumber(L, wParam);
- lua_pushnumber(L, lParam);
+ lua_pushlightuserdata(L, (void*)wParam);
+ lua_pushlightuserdata(L, (void*)lParam);
if (lua_pcall(L, 2, 1, 0))
CallService(MS_NETLIB_LOG, (WPARAM)hNetlib, (LPARAM)lua_tostring(L, -1));
|