Add emptiness checking to ql module

This commit is contained in:
Yinan Zhang
2020-04-02 13:05:16 -07:00
parent 1dd24ca6d2
commit a62b7ed928
2 changed files with 4 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ struct { \
(a_head)->qlh_first = NULL; \
} while (0)
#define ql_empty(a_head) ((a_head)->qlh_first == NULL)
#define ql_elm_new(a_elm, a_field) qr_new((a_elm), a_field)
#define ql_first(a_head) ((a_head)->qlh_first)