1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 18:23:13 +02:00

Add API version string: do not load plugins with wrong API version (fix crash when loading old/obsolete plugins)

This commit is contained in:
Sebastien Helleu
2009-05-02 22:56:14 +02:00
parent 9cb6b4d158
commit 747b78aff3
10 changed files with 103 additions and 14 deletions
+6 -2
View File
@@ -32,9 +32,13 @@ struct t_gui_completion;
struct t_infolist;
struct t_weelist;
/* API version (used to check that plugin has same API and can be loaded) */
#define WEECHAT_PLUGIN_API_VERSION "20090502-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
char weechat_plugin_name[] = __name;
#define WEECHAT_PLUGIN_NAME(__name) \
char weechat_plugin_name[] = __name; \
char weechat_plugin_api_version[] = WEECHAT_PLUGIN_API_VERSION;
#define WEECHAT_PLUGIN_AUTHOR(__author) \
char weechat_plugin_author[] = __author;
#define WEECHAT_PLUGIN_DESCRIPTION(__desc) \