blobmsg: allow BLOBMSG_TYPE_UNSPEC attributes, treat them as null for JSON conversion
[project/libubox.git] / list_compat.h
1 #ifndef __LIST_COMPAT_H
2 #define __LIST_COMPAT_H
3
4 #define list_entity list_head
5
6 #define list_init_head(_list) INIT_LIST_HEAD(_list)
7 #define list_add_head(_head, _list) list_add(_list, _head)
8 #define list_add_after(_after, _list) list_add(_list, _after)
9 #define list_add_before(_before, _list) list_add_tail(_list, _before)
10 #define list_remove(_list) list_del(_list)
11 #define list_is_empty(_list) list_empty(_list)
12 #define list_next_element(_element, _member) list_entry((_element)->_member.next, typeof(*(_element)), _member)
13
14
15 #endif