From 2e28f7c6bee20e836c1a3b4f91e5139564b2b666 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 27 Jan 2014 22:50:40 +0100 Subject: [PATCH] api: add function hashtable_dup --- src/plugins/plugin.c | 1 + src/plugins/weechat-plugin.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 424735560..d420a4b0d 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -588,6 +588,7 @@ plugin_load (const char *filename, int argc, char **argv) new_plugin->hashtable_has_key = &hashtable_has_key; new_plugin->hashtable_map = &hashtable_map; new_plugin->hashtable_map_string = &hashtable_map_string; + new_plugin->hashtable_dup = &hashtable_dup; new_plugin->hashtable_get_integer = &hashtable_get_integer; new_plugin->hashtable_get_string = &hashtable_get_string; new_plugin->hashtable_set_pointer = &hashtable_set_pointer; diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 9eaccb9ba..600838092 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -58,7 +58,7 @@ struct timeval; * please change the date with current one; for a second change at same * date, increment the 01, otherwise please keep 01. */ -#define WEECHAT_PLUGIN_API_VERSION "20140125-01" +#define WEECHAT_PLUGIN_API_VERSION "20140127-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -359,6 +359,7 @@ struct t_weechat_plugin const char *key, const char *value), void *callback_map_data); + struct t_hashtable *(*hashtable_dup) (struct t_hashtable *hashtable); int (*hashtable_get_integer) (struct t_hashtable *hashtable, const char *property); const char *(*hashtable_get_string) (struct t_hashtable *hashtable, @@ -1160,6 +1161,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); __cb_map_data) \ weechat_plugin->hashtable_map_string(__hashtable, __cb_map, \ __cb_map_data) +#define weechat_hashtable_dup(__hashtable) \ + weechat_plugin->hashtable_dup(__hashtable) #define weechat_hashtable_get_integer(__hashtable, __property) \ weechat_plugin->hashtable_get_integer(__hashtable, __property) #define weechat_hashtable_get_string(__hashtable, __property) \