mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 15:53:12 +02:00
core: add hashtable_add_from_infolist to API
This commit is contained in:
@@ -711,6 +711,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
|
||||
new_plugin->hashtable_get_string = &hashtable_get_string;
|
||||
new_plugin->hashtable_set_pointer = &hashtable_set_pointer;
|
||||
new_plugin->hashtable_add_to_infolist = &hashtable_add_to_infolist;
|
||||
new_plugin->hashtable_add_from_infolist = &hashtable_add_from_infolist;
|
||||
new_plugin->hashtable_remove = &hashtable_remove;
|
||||
new_plugin->hashtable_remove_all = &hashtable_remove_all;
|
||||
new_plugin->hashtable_free = &hashtable_free;
|
||||
|
||||
@@ -66,7 +66,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 "20170530-02"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20170617-01"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
@@ -465,6 +465,9 @@ struct t_weechat_plugin
|
||||
int (*hashtable_add_to_infolist) (struct t_hashtable *hashtable,
|
||||
struct t_infolist_item *infolist_item,
|
||||
const char *prefix);
|
||||
int (*hashtable_add_from_infolist) (struct t_hashtable *hashtable,
|
||||
struct t_infolist *infolist,
|
||||
const char *prefix);
|
||||
void (*hashtable_remove) (struct t_hashtable *hashtable, const void *key);
|
||||
void (*hashtable_remove_all) (struct t_hashtable *hashtable);
|
||||
void (*hashtable_free) (struct t_hashtable *hashtable);
|
||||
@@ -1396,6 +1399,11 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
|
||||
(weechat_plugin->hashtable_add_to_infolist)(__hashtable, \
|
||||
__infolist_item, \
|
||||
__prefix)
|
||||
#define weechat_hashtable_add_from_infolist(__hashtable, __infolist, \
|
||||
__prefix) \
|
||||
(weechat_plugin->hashtable_add_from_infolist)(__hashtable, \
|
||||
__infolist, \
|
||||
__prefix)
|
||||
#define weechat_hashtable_remove(__hashtable, __key) \
|
||||
(weechat_plugin->hashtable_remove)(__hashtable, __key)
|
||||
#define weechat_hashtable_remove_all(__hashtable) \
|
||||
|
||||
Reference in New Issue
Block a user