From c5ea3df8b269339e1f6ff91fc6bb0c838e0e10bb Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 11 Jun 2015 23:05:36 +0000 Subject: MirLua: WPARAM/LPARAM is pointers, not numbers git-svn-id: http://svn.miranda-ng.org/main/trunk@14130 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_core.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index e4c90da074..892d66dc2a 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -23,8 +23,8 @@ static int lua_DestroyHookableEvent(lua_State *L) static int lua_NotifyEventHooks(lua_State *L) { HANDLE hEvent = (HANDLE)lua_touserdata(L, 1); - WPARAM wParam = (WPARAM)lua_tointeger(L, 2); - LPARAM lParam = (LPARAM)lua_tointeger(L, 3); + WPARAM wParam = (WPARAM)lua_topointer(L, 2); + LPARAM lParam = (LPARAM)lua_topointer(L, 3); int res = ::NotifyEventHooks(hEvent, wParam, lParam); lua_pushinteger(L, res); @@ -175,9 +175,8 @@ static int lua_ServiceExists(lua_State *L) static int lua_CallService(lua_State *L) { const char *name = luaL_checkstring(L, 1); - - WPARAM wParam = (WPARAM)luaL_checkinteger(L, 2); - LPARAM lParam = (LPARAM)luaL_checkinteger(L, 3); + WPARAM wParam = (WPARAM)lua_topointer(L, 2); + LPARAM lParam = (LPARAM)lua_topointer(L, 3); INT_PTR res = ::CallService(name, wParam, lParam); lua_pushinteger(L, res); -- cgit v1.2.3