--- a/src/cx/list.h Tue Dec 28 17:38:02 2021 +0100 +++ b/src/cx/list.h Tue Dec 28 17:41:51 2021 +0100 @@ -114,6 +114,11 @@ cx_list_s const *list, cx_list_s const *other ); + + /** + * Member function for reversing the order of the items. + */ + void (*reverse)(cx_list_s *list); } cx_list_class; /** @@ -249,6 +254,15 @@ } /** + * Reverses the order of the items. + * + * @param list the list + */ +static inline void cxListReverse(CxList list) { + list->cl->reverse(list); +} + +/** * Compares a list to another list of the same type. * * First, the list sizes are compared. If they match, the lists are compared element-wise.