From b3c00abbbb7d54062c51685e78be27cecf917672 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 24 Mar 2012 10:59:21 +0100 Subject: api: use a struct for arguments of function script_init (callbacks) --- src/plugins/scripts/lua/weechat-lua.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/plugins/scripts/lua/weechat-lua.c') diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index 9b4d3bdb2..1890765f1 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -730,19 +730,20 @@ weechat_lua_signal_script_action_cb (void *data, const char *signal, int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + struct t_plugin_script_init init; + weechat_lua_plugin = plugin; + init.callback_command = &weechat_lua_command_cb; + init.callback_completion = &weechat_lua_completion_cb; + init.callback_infolist = &weechat_lua_infolist_cb; + init.callback_signal_debug_dump = &weechat_lua_signal_debug_dump_cb; + init.callback_signal_buffer_closed = &weechat_lua_signal_buffer_closed_cb; + init.callback_signal_script_action = &weechat_lua_signal_script_action_cb; + init.callback_load_file = &weechat_lua_load_cb; + lua_quiet = 1; - script_init (weechat_lua_plugin, - argc, - argv, - &weechat_lua_command_cb, - &weechat_lua_completion_cb, - &weechat_lua_infolist_cb, - &weechat_lua_signal_debug_dump_cb, - &weechat_lua_signal_buffer_closed_cb, - &weechat_lua_signal_script_action_cb, - &weechat_lua_load_cb); + script_init (weechat_lua_plugin, argc, argv, &init); lua_quiet = 0; script_display_short_list (weechat_lua_plugin, -- cgit v1.2.3