MT#55283 add extra typed container methods

Change-Id: I406238c947b3b02341f021dbacb6cb06502181ec
pull/1910/head
Richard Fuchs 10 months ago
parent b9972e481e
commit bdadee5dff

@ -254,6 +254,11 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) {
g_queue_push_head(&(Q)->q, __e); \
})
#define t_queue_push_head_link(Q, k) ({ \
__typeof__((Q)->head) __l = k; \
g_queue_push_head_link(&(Q)->q, &__l->l); \
})
#define t_queue_push_tail(Q, e) ({ \
__typeof__((Q)->__t) __e = e; \
g_queue_push_tail(&(Q)->q, __e); \
@ -305,6 +310,11 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) {
g_queue_delete_link(&(Q)->q, &(__l)->l); \
})
#define t_queue_unlink(Q, L) ({ \
__typeof__((Q)->head) __l = L; \
g_queue_unlink(&(Q)->q, &(__l)->l); \
})
#define t_queue_find_custom(Q, e, f) ({ \
int (*__f)(__typeof__((Q)->__ct), const void *) = f; \
GList *__l = g_queue_find_custom(&(Q)->q, e, (GCompareFunc) __f); \

Loading…
Cancel
Save