1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-20 01:54:46 +02:00

api: change type of argument remaining_calls in hook_timer callback from string to integer (in scripts)

This commit is contained in:
Sébastien Helleu
2022-09-29 21:21:01 +02:00
parent 89400cbf7a
commit b2b110f1a3
14 changed files with 51 additions and 49 deletions
+3 -6
View File
@@ -2243,7 +2243,7 @@ weechat_python_api_hook_timer_cb (const void *pointer, void *data,
{
struct t_plugin_script *script;
void *func_argv[2];
char str_remaining_calls[32], empty_arg[1] = { '\0' };
char empty_arg[1] = { '\0' };
const char *ptr_function, *ptr_data;
int *rc, ret;
@@ -2252,16 +2252,13 @@ weechat_python_api_hook_timer_cb (const void *pointer, void *data,
if (ptr_function && ptr_function[0])
{
snprintf (str_remaining_calls, sizeof (str_remaining_calls),
"%d", remaining_calls);
func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg;
func_argv[1] = str_remaining_calls;
func_argv[1] = &remaining_calls;
rc = (int *) weechat_python_exec (script,
WEECHAT_SCRIPT_EXEC_INT,
ptr_function,
"ss", func_argv);
"si", func_argv);
if (!rc)
ret = WEECHAT_RC_ERROR;