diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-09-29 21:38:04 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-09-29 21:38:04 +0200 |
commit | 92cdcee8f64fd74cc1242c0fe23ae2c8b1e4aef2 (patch) | |
tree | a1b69c6102ffce62cc2abfb425be50e3a310e9e0 /src/plugins/tcl/weechat-tcl-api.c | |
parent | b2b110f1a377e92928118c4ccf921bbb2f69ced9 (diff) | |
download | weechat-92cdcee8f64fd74cc1242c0fe23ae2c8b1e4aef2.zip |
api: change type of argument object_id in upgrade_new callback from string to integer (in scripts)
Diffstat (limited to 'src/plugins/tcl/weechat-tcl-api.c')
-rw-r--r-- | src/plugins/tcl/weechat-tcl-api.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index e4fb7395a..cd1474521 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -5637,7 +5637,7 @@ weechat_tcl_api_upgrade_read_cb (const void *pointer, void *data, { struct t_plugin_script *script; void *func_argv[4]; - char empty_arg[1] = { '\0' }, str_object_id[32]; + char empty_arg[1] = { '\0' }; const char *ptr_function, *ptr_data; int *rc, ret; @@ -5646,17 +5646,15 @@ weechat_tcl_api_upgrade_read_cb (const void *pointer, void *data, if (ptr_function && ptr_function[0]) { - snprintf (str_object_id, sizeof (str_object_id), "%d", object_id); - func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(upgrade_file); - func_argv[2] = str_object_id; + func_argv[2] = &object_id; func_argv[3] = (char *)API_PTR2STR(infolist); rc = (int *) weechat_tcl_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ssss", func_argv); + "ssis", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; |