diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-08-04 13:58:25 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-08-04 13:58:25 +0200 |
commit | 00b879962a09cfcbbd6e2e7629058a1fc41c5749 (patch) | |
tree | 27337815cd32e5e84bfdfd1d1d20accd0944941c /src/plugins | |
parent | 3c3d0754b18bed92db589cf506fe4d4d7031309a (diff) | |
download | weechat-00b879962a09cfcbbd6e2e7629058a1fc41c5749.zip |
api: add new function util_version_number
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/plugin.c | 1 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 9017c4ed2..8fa3f1e87 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -550,6 +550,7 @@ plugin_load (const char *filename, int argc, char **argv) new_plugin->util_timeval_diff = &util_timeval_diff; new_plugin->util_timeval_add = &util_timeval_add; new_plugin->util_get_time_string = &util_get_time_string; + new_plugin->util_version_number = &util_version_number; new_plugin->list_new = &weelist_new; new_plugin->list_add = &weelist_add; diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index ef8f048b6..b5f14851b 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -46,7 +46,7 @@ struct timeval; */ /* API version (used to check that plugin has same API and can be loaded) */ -#define WEECHAT_PLUGIN_API_VERSION "20120720-01" +#define WEECHAT_PLUGIN_API_VERSION "20120804-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -279,6 +279,7 @@ struct t_weechat_plugin long (*util_timeval_diff) (struct timeval *tv1, struct timeval *tv2); void (*util_timeval_add) (struct timeval *tv, long interval); char *(*util_get_time_string) (const time_t *date); + int (*util_version_number) (const char *version); /* sorted lists */ struct t_weelist *(*list_new) (); @@ -1052,6 +1053,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); weechat_plugin->util_timeval_add(__time, __interval) #define weechat_util_get_time_string(__date) \ weechat_plugin->util_get_time_string(__date) +#define weechat_util_version_number(__version) \ + weechat_plugin->util_version_number(__version) /* sorted list */ #define weechat_list_new() \ |