summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/plugin.h2
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c4
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c4
-rw-r--r--src/plugins/scripts/python/weechat-python.c4
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby.c4
-rw-r--r--src/plugins/weechat-plugin.h3
6 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h
index e74b24070..ca2d3e3a2 100644
--- a/src/plugins/plugin.h
+++ b/src/plugins/plugin.h
@@ -23,7 +23,7 @@
#include "weechat-plugin.h"
typedef int (t_weechat_init_func) (struct t_weechat_plugin *plugin);
-typedef void (t_weechat_end_func) (struct t_weechat_plugin *plugin);
+typedef int (t_weechat_end_func) (struct t_weechat_plugin *plugin);
extern struct t_weechat_plugin *weechat_plugins;
extern struct t_weechat_plugin *last_weechat_plugin;
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index 751e3ff9b..7bd6ed20e 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -459,7 +459,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
* weechat_plugin_end: shutdown Lua interface
*/
-void
+int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* make C compiler happy */
@@ -467,4 +467,6 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* unload all scripts */
weechat_lua_unload_all ();
+
+ return WEECHAT_RC_OK;
}
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index 3f3fed365..f7324dedc 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -610,7 +610,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
* weechat_plugin_end: end Perl plugin
*/
-void
+int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* make C compiler happy */
@@ -628,4 +628,6 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
perl_main = NULL;
}
#endif
+
+ return WEECHAT_RC_OK;
}
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index b117cb9e2..216a0c087 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -649,7 +649,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
* weechat_plugin_end: shutdown Python interface
*/
-void
+int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* make C compiler happy */
@@ -674,4 +674,6 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
weechat_gettext ("%s%s: unable to free interpreter"),
weechat_prefix ("error"), "python");
}
+
+ return WEECHAT_RC_OK;
}
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c
index de69dd58d..b53f94dd0 100644
--- a/src/plugins/scripts/ruby/weechat-ruby.c
+++ b/src/plugins/scripts/ruby/weechat-ruby.c
@@ -701,7 +701,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
* weechat_plugin_end: shutdown Ruby interface
*/
-void
+int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* make C compiler happy */
@@ -711,4 +711,6 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
weechat_ruby_unload_all ();
ruby_finalize();
+
+ return WEECHAT_RC_OK;
}
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 91112eb0c..2e76818d9 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -340,6 +340,9 @@ struct t_weechat_plugin
/* WeeChat developers: ALWAYS add new functions at the end */
};
+extern int weechat_plugin_init (struct t_weechat_plugin *plugin);
+extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
+
/* macros for easy call to plugin API */
/* strings */