aboutsummaryrefslogtreecommitdiff
path: root/qlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'qlist.h')
-rw-r--r--qlist.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/qlist.h b/qlist.h
index afdc4465bf..a3261e1781 100644
--- a/qlist.h
+++ b/qlist.h
@@ -29,6 +29,16 @@ typedef struct QList {
#define qlist_append(qlist, obj) \
qlist_append_obj(qlist, QOBJECT(obj))
+#define QLIST_FOREACH_ENTRY(qlist, var) \
+ for ((var) = ((qlist)->head.tqh_first); \
+ (var); \
+ (var) = ((var)->next.tqe_next))
+
+static inline QObject *qlist_entry_obj(const QListEntry *entry)
+{
+ return entry->value;
+}
+
QList *qlist_new(void);
QList *qlist_copy(QList *src);
void qlist_append_obj(QList *qlist, QObject *obj);