diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-11 23:05:36 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-11 23:05:36 +0000 |
commit | c5ea3df8b269339e1f6ff91fc6bb0c838e0e10bb (patch) | |
tree | 49c36da3bbce5aad08faaad44cfceb2c515cd7bf /plugins | |
parent | 465d1d9bdb29d7c527a572742478abcd4bbe9d1f (diff) |
MirLua: WPARAM/LPARAM is pointers, not numbers
git-svn-id: http://svn.miranda-ng.org/main/trunk@14130 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MirLua/src/m_core.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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);
|