1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 03:03:12 +02:00

api: add function list_user_data (issue #666)

This commit is contained in:
Andrew Potter
2019-08-10 12:55:43 +02:00
committed by Sébastien Helleu
parent 464d31155a
commit 0957231d30
10 changed files with 177 additions and 8 deletions
+13
View File
@@ -349,6 +349,19 @@ weelist_string (struct t_weelist_item *item)
return NULL;
}
/*
* Gets user data pointer to item data.
*/
void *
weelist_user_data (struct t_weelist_item *item)
{
if (item)
return item->user_data;
return NULL;
}
/*
* Gets size of list.
*/
+1
View File
@@ -51,6 +51,7 @@ extern void weelist_set (struct t_weelist_item *item, const char *value);
extern struct t_weelist_item *weelist_next (struct t_weelist_item *item);
extern struct t_weelist_item *weelist_prev (struct t_weelist_item *item);
extern const char *weelist_string (struct t_weelist_item *item);
extern void *weelist_user_data (struct t_weelist_item *item);
extern int weelist_size (struct t_weelist *weelist);
extern void weelist_remove (struct t_weelist *weelist,
struct t_weelist_item *item);