summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Bouthenot <kolter@openics.org>2006-02-09 10:50:46 +0000
committerEmmanuel Bouthenot <kolter@openics.org>2006-02-09 10:50:46 +0000
commit73990d8caab268c7611979315d9fb77958eace3c (patch)
tree4475c9ae52663dcc732f0cd1d38777ff09797897
parentd4e755a641578cd823c5739ea63d0ea199b43bf7 (diff)
downloadweechat-73990d8caab268c7611979315d9fb77958eace3c.zip
fix weechat_lua_remove_handler : now really use function args
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c7
-rw-r--r--weechat/src/plugins/scripts/lua/weechat-lua.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index 1b4d41688..83c9288d4 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -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;
diff --git a/weechat/src/plugins/scripts/lua/weechat-lua.c b/weechat/src/plugins/scripts/lua/weechat-lua.c
index 1b4d41688..83c9288d4 100644
--- a/weechat/src/plugins/scripts/lua/weechat-lua.c
+++ b/weechat/src/plugins/scripts/lua/weechat-lua.c
@@ -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;