mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
api: use a struct for arguments of function script_init (callbacks)
This commit is contained in:
@@ -939,6 +939,7 @@ weechat_perl_signal_quit_upgrade_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;
|
||||
#ifdef PERL_SYS_INIT3
|
||||
int a;
|
||||
char **perl_args_local;
|
||||
@@ -971,17 +972,16 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
eval_pv (perl_weechat_code, TRUE);
|
||||
#endif
|
||||
|
||||
init.callback_command = &weechat_perl_command_cb;
|
||||
init.callback_completion = &weechat_perl_completion_cb;
|
||||
init.callback_infolist = &weechat_perl_infolist_cb;
|
||||
init.callback_signal_debug_dump = &weechat_perl_signal_debug_dump_cb;
|
||||
init.callback_signal_buffer_closed = &weechat_perl_signal_buffer_closed_cb;
|
||||
init.callback_signal_script_action = &weechat_perl_signal_script_action_cb;
|
||||
init.callback_load_file = &weechat_perl_load_cb;
|
||||
|
||||
perl_quiet = 1;
|
||||
script_init (weechat_perl_plugin,
|
||||
argc,
|
||||
argv,
|
||||
&weechat_perl_command_cb,
|
||||
&weechat_perl_completion_cb,
|
||||
&weechat_perl_infolist_cb,
|
||||
&weechat_perl_signal_debug_dump_cb,
|
||||
&weechat_perl_signal_buffer_closed_cb,
|
||||
&weechat_perl_signal_script_action_cb,
|
||||
&weechat_perl_load_cb);
|
||||
script_init (weechat_perl_plugin, argc, argv, &init);
|
||||
perl_quiet = 0;
|
||||
|
||||
script_display_short_list (weechat_perl_plugin,
|
||||
|
||||
Reference in New Issue
Block a user