summaryrefslogtreecommitdiff
path: root/src/plugins/lua
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-10-15 21:46:00 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-10-15 21:46:00 +0200
commit56dbd871ea5fb4a1aa27f74eba8907f0a962db7f (patch)
tree0515019979651c148293404453b1dc9c6ec39f65 /src/plugins/lua
parenta1057c9a035e77db257158af98153ae69882e19e (diff)
downloadweechat-56dbd871ea5fb4a1aa27f74eba8907f0a962db7f.zip
api: do not expect any return value in callbacks change/delete of config_new_option (scripting API)
Diffstat (limited to 'src/plugins/lua')
-rw-r--r--src/plugins/lua/weechat-lua-api.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/lua/weechat-lua-api.c b/src/plugins/lua/weechat-lua-api.c
index 4022cfd92..95c129d98 100644
--- a/src/plugins/lua/weechat-lua-api.c
+++ b/src/plugins/lua/weechat-lua-api.c
@@ -1262,10 +1262,9 @@ weechat_lua_api_config_option_change_cb (const void *pointer, void *data,
struct t_config_option *option)
{
struct t_plugin_script *script;
- void *func_argv[2];
+ void *func_argv[2], *rc;
char empty_arg[1] = { '\0' };
const char *ptr_function, *ptr_data;
- int *rc;
script = (struct t_plugin_script *)pointer;
plugin_script_get_function_and_data (data, &ptr_function, &ptr_data);
@@ -1275,10 +1274,10 @@ weechat_lua_api_config_option_change_cb (const void *pointer, void *data,
func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg;
func_argv[1] = (char *)API_PTR2STR(option);
- rc = (int *) weechat_lua_exec (script,
- WEECHAT_SCRIPT_EXEC_INT,
- ptr_function,
- "ss", func_argv);
+ rc = weechat_lua_exec (script,
+ WEECHAT_SCRIPT_EXEC_IGNORE,
+ ptr_function,
+ "ss", func_argv);
if (rc)
free (rc);
@@ -1290,10 +1289,9 @@ weechat_lua_api_config_option_delete_cb (const void *pointer, void *data,
struct t_config_option *option)
{
struct t_plugin_script *script;
- void *func_argv[2];
+ void *func_argv[2], *rc;
char empty_arg[1] = { '\0' };
const char *ptr_function, *ptr_data;
- int *rc;
script = (struct t_plugin_script *)pointer;
plugin_script_get_function_and_data (data, &ptr_function, &ptr_data);
@@ -1303,10 +1301,10 @@ weechat_lua_api_config_option_delete_cb (const void *pointer, void *data,
func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg;
func_argv[1] = (char *)API_PTR2STR(option);
- rc = (int *) weechat_lua_exec (script,
- WEECHAT_SCRIPT_EXEC_INT,
- ptr_function,
- "ss", func_argv);
+ rc = weechat_lua_exec (script,
+ WEECHAT_SCRIPT_EXEC_IGNORE,
+ ptr_function,
+ "ss", func_argv);
if (rc)
free (rc);