LIBETPAN_EXPORT struct mailimap_set * mailimap_set_new_single_item(struct mailimap_set_item * item) { struct mailimap_set * set; clist * list; int r; list = clist_new(); if (list == NULL) return NULL; r = clist_append(list, item); if (r < 0) { clist_free(list); return NULL; } set = mailimap_set_new(list); if (set == NULL) { clist_free(list); return NULL; } return set; }
struct mailimap_set * mailimap_set_new_empty(void) { clist * list; list = clist_new(); if (list == NULL) return NULL; return mailimap_set_new(list); }