Update dbl list utilities
This commit is contained in:
@@ -146,23 +146,23 @@ typedef GenericNode Str8Node;
|
|||||||
_dbl_list_remove(LIST_PTR, ITEM_INDEX, sizeof(TYPE))->item \
|
_dbl_list_remove(LIST_PTR, ITEM_INDEX, sizeof(TYPE))->item \
|
||||||
))
|
))
|
||||||
#define wapp_dbl_list_pop_front_node(TYPE, LIST_PTR) \
|
#define wapp_dbl_list_pop_front_node(TYPE, LIST_PTR) \
|
||||||
((TYPE *)( \
|
( \
|
||||||
(LIST_PTR == NULL || (LIST_PTR)->node_count == 0) ? \
|
(LIST_PTR == NULL || (LIST_PTR)->node_count == 0) ? \
|
||||||
NULL : \
|
NULL : \
|
||||||
_dbl_list_pop_front(LIST_PTR, sizeof(TYPE)) \
|
_dbl_list_pop_front(LIST_PTR, sizeof(TYPE)) \
|
||||||
))
|
)
|
||||||
#define wapp_dbl_list_pop_back_node(TYPE, LIST_PTR) \
|
#define wapp_dbl_list_pop_back_node(TYPE, LIST_PTR) \
|
||||||
((TYPE *)( \
|
( \
|
||||||
(LIST_PTR == NULL || (LIST_PTR)->node_count == 0) ? \
|
(LIST_PTR == NULL || (LIST_PTR)->node_count == 0) ? \
|
||||||
NULL : \
|
NULL : \
|
||||||
_dbl_list_pop_back(LIST_PTR, sizeof(TYPE)) \
|
_dbl_list_pop_back(LIST_PTR, sizeof(TYPE)) \
|
||||||
))
|
)
|
||||||
#define wapp_dbl_list_remove_node(TYPE, LIST_PTR, ITEM_INDEX) \
|
#define wapp_dbl_list_remove_node(TYPE, LIST_PTR, ITEM_INDEX) \
|
||||||
((TYPE *)( \
|
( \
|
||||||
(LIST_PTR == NULL || (LIST_PTR)->node_count == 0 || ITEM_INDEX >= (LIST_PTR)->node_count) ? \
|
(LIST_PTR == NULL || (LIST_PTR)->node_count == 0 || ITEM_INDEX >= (LIST_PTR)->node_count) ? \
|
||||||
NULL : \
|
NULL : \
|
||||||
_dbl_list_remove(LIST_PTR, ITEM_INDEX, sizeof(TYPE)) \
|
_dbl_list_remove(LIST_PTR, ITEM_INDEX, sizeof(TYPE)) \
|
||||||
))
|
)
|
||||||
#define wapp_dbl_list_empty(TYPE, LIST_PTR) \
|
#define wapp_dbl_list_empty(TYPE, LIST_PTR) \
|
||||||
(_dbl_list_empty(LIST_PTR, sizeof(TYPE)))
|
(_dbl_list_empty(LIST_PTR, sizeof(TYPE)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user