MT#61625 add t_slist_free_full wrapper

Change-Id: Ib47bc4890ecfeac5a6814505abe77b4454cda5e3
pull/1918/head
Richard Fuchs 9 months ago
parent 923fecd242
commit 8ab206c26a

@ -407,6 +407,11 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) {
__ret; \
})
#define t_slist_free_full(L, f) ({ \
void (*__fn)(__typeof__((L)->data)) = (f); \
g_slist_free_full(&(L)->l, (GDestroyNotify) __fn); \
})
#define t_slist_delete_link(L, k) ({ \
GSList *__r = g_slist_delete_link(&(L)->l, &(k)->l); \
__typeof__(L) __ret = (__typeof__(L)) __r; \

Loading…
Cancel
Save