diff -r 8f7d3fe9ca40 -r da11a5a765a0 src/cx/list.h --- a/src/cx/list.h Sun Oct 03 18:36:51 2021 +0200 +++ b/src/cx/list.h Sun Oct 03 18:37:13 2021 +0200 @@ -85,6 +85,12 @@ void *cxListLast(CxList list); +#define cxTypedListAdd(type, list, elem) (cxListAdd(list, (type*) (elem))) +#define cxTypedListInsert(type, list, index, elem) (cxListInsert(list, index, (type*) (elem))) +#define cxTypedListAt(type, list, index) ((type*)cxListAt(list, index)) +#define cxTypedListFind(type, list, elem) (cxListFind(list, (type*) (elem))) +#define cxTypedListLast(type, list) ((type*)cxListLast(list)) + #ifdef __cplusplus } /* extern "C" */ #endif