From 44cebe183fc13d6ced4c2eed155aa03909a542f4 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 25 Dec 2015 22:14:44 +0000 Subject: MirLua: minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15942 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_hotkeys.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/MirLua/src/m_hotkeys.cpp') diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp index e998b04a9a..2c71f28273 100644 --- a/plugins/MirLua/src/m_hotkeys.cpp +++ b/plugins/MirLua/src/m_hotkeys.cpp @@ -55,19 +55,18 @@ static int lua_Register(lua_State *L) MakeHotkey(L, hk); INT_PTR res = ::CallService("CoreHotkeys/Register", (WPARAM)hScriptsLangpack, (LPARAM)&hk); - lua_pushinteger(L, res); + lua_pushboolean(L, res); return 1; } static int lua_Unregister(lua_State *L) { - const char* name = luaL_checkstring(L, 1); + const char *name = luaL_checkstring(L, 1); - INT_PTR res = ::CallService("CoreHotkeys/Unregister", 0, (LPARAM)name); - lua_pushinteger(L, res); + ::CallService("CoreHotkeys/Unregister", 0, (LPARAM)name); - return 1; + return 0; } static int lua_MakeHotkey(lua_State *L) @@ -83,11 +82,10 @@ static int lua_MakeHotkey(lua_State *L) static luaL_Reg hotkeysApi[] = { + { "MakeHotkey", lua_MakeHotkey }, { "Register", lua_Register }, { "Unregister", lua_Unregister }, - { "MakeHotkey", lua_MakeHotkey }, - { NULL, NULL } }; -- cgit v1.2.3