diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/guile/weechat-guile-api.c | 9 | ||||
-rw-r--r-- | src/plugins/javascript/weechat-js-api.cpp | 9 | ||||
-rw-r--r-- | src/plugins/lua/weechat-lua-api.c | 9 | ||||
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 9 | ||||
-rw-r--r-- | src/plugins/python/weechat-python-api.c | 9 | ||||
-rw-r--r-- | src/plugins/ruby/weechat-ruby-api.c | 9 | ||||
-rw-r--r-- | src/plugins/tcl/weechat-tcl-api.c | 9 |
7 files changed, 21 insertions, 42 deletions
diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c index ce0d8c75a..539c37020 100644 --- a/src/plugins/guile/weechat-guile-api.c +++ b/src/plugins/guile/weechat-guile-api.c @@ -2220,7 +2220,7 @@ weechat_guile_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; @@ -2229,16 +2229,13 @@ weechat_guile_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_guile_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ss", func_argv); + "si", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; diff --git a/src/plugins/javascript/weechat-js-api.cpp b/src/plugins/javascript/weechat-js-api.cpp index 5019ccbe7..8e2e56b85 100644 --- a/src/plugins/javascript/weechat-js-api.cpp +++ b/src/plugins/javascript/weechat-js-api.cpp @@ -2125,7 +2125,7 @@ weechat_js_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; @@ -2134,16 +2134,13 @@ weechat_js_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_js_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ss", func_argv); + "si", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; diff --git a/src/plugins/lua/weechat-lua-api.c b/src/plugins/lua/weechat-lua-api.c index 6364e86b7..f5bd9ec14 100644 --- a/src/plugins/lua/weechat-lua-api.c +++ b/src/plugins/lua/weechat-lua-api.c @@ -2341,7 +2341,7 @@ weechat_lua_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; @@ -2350,16 +2350,13 @@ weechat_lua_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_lua_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ss", func_argv); + "si", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index d25c8f600..c7fc20bde 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -2252,7 +2252,7 @@ weechat_perl_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; @@ -2261,16 +2261,13 @@ weechat_perl_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_perl_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ss", func_argv); + "si", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c index e8585c368..c487e7d84 100644 --- a/src/plugins/python/weechat-python-api.c +++ b/src/plugins/python/weechat-python-api.c @@ -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; diff --git a/src/plugins/ruby/weechat-ruby-api.c b/src/plugins/ruby/weechat-ruby-api.c index a1a8edf05..59bfcfffc 100644 --- a/src/plugins/ruby/weechat-ruby-api.c +++ b/src/plugins/ruby/weechat-ruby-api.c @@ -2763,7 +2763,7 @@ weechat_ruby_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; @@ -2772,16 +2772,13 @@ weechat_ruby_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_ruby_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ss", func_argv); + "si", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index c7494aa67..e4fb7395a 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -2534,7 +2534,7 @@ weechat_tcl_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; @@ -2543,16 +2543,13 @@ weechat_tcl_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_tcl_exec (script, WEECHAT_SCRIPT_EXEC_INT, ptr_function, - "ss", func_argv); + "si", func_argv); if (!rc) ret = WEECHAT_RC_ERROR; |