1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

fix weechat_lua_remove_handler : now really use function args

This commit is contained in:
Emmanuel Bouthenot
2006-02-09 10:50:46 +00:00
parent d4e755a641
commit 73990d8caa
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -462,7 +462,7 @@ weechat_lua_remove_handler (lua_State *L)
/* make gcc happy */
(void) L;
char *command, *function;
const char *command, *function;
if (!lua_current_script)
{
@@ -486,9 +486,12 @@ weechat_lua_remove_handler (lua_State *L)
lua_pushnumber (lua_current_interpreter, 0);
return 1;
}
command = lua_tostring (lua_current_interpreter, -2);
function = lua_tostring (lua_current_interpreter, -1);
weechat_script_remove_handler (lua_plugin, lua_current_script,
command, function);
(char *) command, (char *) function);
lua_pushnumber (lua_current_interpreter, 1);
return 1;