mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
use _list_consume to destroy objects
This commit is contained in:
parent
ec1d7b8df7
commit
39240fb9c0
10 changed files with 40 additions and 37 deletions
|
|
@ -78,6 +78,11 @@ static inline void spa_list_remove(struct spa_list *elem)
|
|||
#define spa_list_next(pos, member) \
|
||||
SPA_CONTAINER_OF((pos)->member.next, __typeof__(*pos), member)
|
||||
|
||||
#define spa_list_consume(pos, head, member) \
|
||||
for (pos = spa_list_first(head, __typeof__(*pos), member); \
|
||||
!spa_list_is_empty(head); \
|
||||
pos = spa_list_first(head, __typeof__(*pos), member))
|
||||
|
||||
#define spa_list_for_each_next(pos, head, curr, member) \
|
||||
for (pos = spa_list_first(curr, __typeof__(*pos), member); \
|
||||
!spa_list_is_end(pos, head, member); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue