diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 13 | ||||
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl-api.c | 13 | ||||
-rw-r--r-- | src/plugins/scripts/python/weechat-python-api.c | 13 | ||||
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby-api.c | 13 | ||||
-rw-r--r-- | src/plugins/scripts/script-api.h | 4 |
5 files changed, 13 insertions, 43 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index be63780d3..1b8508e65 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -4678,23 +4678,16 @@ weechat_lua_api_bar_item_search (lua_State *L) char * weechat_lua_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, - struct t_gui_window *window, - int max_width, int max_height) + struct t_gui_window *window) { struct t_script_callback *script_callback; - char *lua_argv[5], *ret; - static char str_width[32], str_height[32]; + char *lua_argv[3], *ret; script_callback = (struct t_script_callback *)data; - - snprintf (str_width, sizeof (str_width), "%d", max_width); - snprintf (str_height, sizeof (str_height), "%d", max_height); lua_argv[0] = script_ptr2str (item); lua_argv[1] = script_ptr2str (window); - lua_argv[2] = str_width; - lua_argv[3] = str_height; - lua_argv[4] = NULL; + lua_argv[2] = NULL; ret = (char *)weechat_lua_exec (script_callback->script, WEECHAT_SCRIPT_EXEC_STRING, diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index faca5fcec..f1fe74c6b 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -3929,23 +3929,16 @@ static XS (XS_weechat_api_bar_item_search) char * weechat_perl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, - struct t_gui_window *window, - int max_width, int max_height) + struct t_gui_window *window) { struct t_script_callback *script_callback; - char *perl_argv[5], *ret; - static char str_width[32], str_height[32]; + char *perl_argv[3], *ret; script_callback = (struct t_script_callback *)data; - snprintf (str_width, sizeof (str_width), "%d", max_width); - snprintf (str_height, sizeof (str_height), "%d", max_height); - perl_argv[0] = script_ptr2str (item); perl_argv[1] = script_ptr2str (window); - perl_argv[2] = str_width; - perl_argv[3] = str_height; - perl_argv[4] = NULL; + perl_argv[2] = NULL; ret = (char *)weechat_perl_exec (script_callback->script, WEECHAT_SCRIPT_EXEC_STRING, diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index bd9cfad00..33c047c45 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -4173,23 +4173,16 @@ weechat_python_api_bar_item_search (PyObject *self, PyObject *args) char * weechat_python_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, - struct t_gui_window *window, - int max_width, int max_height) + struct t_gui_window *window) { struct t_script_callback *script_callback; - char *python_argv[5], *ret; - static char str_width[32], str_height[32]; + char *python_argv[3], *ret; script_callback = (struct t_script_callback *)data; - - snprintf (str_width, sizeof (str_width), "%d", max_width); - snprintf (str_height, sizeof (str_height), "%d", max_height); python_argv[0] = script_ptr2str (item); python_argv[1] = script_ptr2str (window); - python_argv[2] = str_width; - python_argv[3] = str_height; - python_argv[4] = NULL; + python_argv[2] = NULL; ret = (char *)weechat_python_exec (script_callback->script, WEECHAT_SCRIPT_EXEC_STRING, diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index 636a3bda4..8645a88b1 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -4779,23 +4779,16 @@ weechat_ruby_api_bar_item_search (VALUE class, VALUE name) char * weechat_ruby_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item, - struct t_gui_window *window, - int max_width, int max_height) + struct t_gui_window *window) { struct t_script_callback *script_callback; - char *ruby_argv[5], *ret; - static char str_width[32], str_height[32]; + char *ruby_argv[3], *ret; script_callback = (struct t_script_callback *)data; - - snprintf (str_width, sizeof (str_width), "%d", max_width); - snprintf (str_height, sizeof (str_height), "%d", max_height); ruby_argv[0] = script_ptr2str (item); ruby_argv[1] = script_ptr2str (window); - ruby_argv[2] = str_width; - ruby_argv[3] = str_height; - ruby_argv[4] = NULL; + ruby_argv[2] = NULL; ret = (char *)weechat_ruby_exec (script_callback->script, WEECHAT_SCRIPT_EXEC_STRING, diff --git a/src/plugins/scripts/script-api.h b/src/plugins/scripts/script-api.h index f6f04caad..15122b96a 100644 --- a/src/plugins/scripts/script-api.h +++ b/src/plugins/scripts/script-api.h @@ -219,9 +219,7 @@ extern struct t_gui_bar_item *script_api_bar_item_new (struct t_weechat_plugin * const char *name, char *(*build_callback)(void *data, struct t_gui_bar_item *item, - struct t_gui_window *window, - int max_width, - int max_height), + struct t_gui_window *window), const char *function_build); extern void script_api_bar_item_remove (struct t_weechat_plugin *weechat_plugin, struct t_plugin_script *script, |