From 55b1f7fafef7085638c4c8604b248bbe9fe08124 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 17 Apr 2016 15:43:34 +0000 Subject: MirLua: - added function topointer into _G - overrided tonumber to support pointers - api methods is only support light userdata as wparam/lparam git-svn-id: http://svn.miranda-ng.org/main/trunk@16697 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/Modules/m_toptoolbar/src/main.cpp | 8 ++++---- plugins/MirLua/Modules/m_toptoolbar/src/stdafx.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/MirLua/Modules') diff --git a/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp b/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp index 477cf7565b..af73c963ce 100644 --- a/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp +++ b/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp @@ -29,11 +29,11 @@ static TTBButton* MakeTBButton(lua_State *L) lua_pop(L, 1); lua_getfield(L, -1, "wParamUp"); - tbb->wParamUp = luaM_towparam(L, -1); + tbb->wParamUp = (WPARAM)lua_touserdata(L, -1); lua_pop(L, 1); lua_getfield(L, -1, "lParamUp"); - tbb->lParamUp = luaM_tolparam(L, -1); + tbb->lParamUp = (LPARAM)lua_touserdata(L, -1); lua_pop(L, 1); // dn state @@ -46,11 +46,11 @@ static TTBButton* MakeTBButton(lua_State *L) lua_pop(L, 1); lua_getfield(L, -1, "wParamDown"); - tbb->wParamDown = luaM_towparam(L, -1); + tbb->wParamDown = (WPARAM)lua_touserdata(L, -1); lua_pop(L, 1); lua_getfield(L, -1, "lParamDown"); - tbb->lParamDown = luaM_tolparam(L, -1); + tbb->lParamDown = (LPARAM)lua_touserdata(L, -1); lua_pop(L, 1); return tbb; diff --git a/plugins/MirLua/Modules/m_toptoolbar/src/stdafx.h b/plugins/MirLua/Modules/m_toptoolbar/src/stdafx.h index 741eb49bd9..d69907bf2c 100644 --- a/plugins/MirLua/Modules/m_toptoolbar/src/stdafx.h +++ b/plugins/MirLua/Modules/m_toptoolbar/src/stdafx.h @@ -3,7 +3,8 @@ #include -#include +#include + #include #include #include -- cgit v1.2.3