src/cx/list.h

changeset 458
da11a5a765a0
parent 453
bb144d08cd44
child 460
e075009b33b7
     1.1 --- a/src/cx/list.h	Sun Oct 03 18:36:51 2021 +0200
     1.2 +++ b/src/cx/list.h	Sun Oct 03 18:37:13 2021 +0200
     1.3 @@ -85,6 +85,12 @@
     1.4  
     1.5  void *cxListLast(CxList list);
     1.6  
     1.7 +#define cxTypedListAdd(type, list, elem) (cxListAdd(list, (type*) (elem)))
     1.8 +#define cxTypedListInsert(type, list, index, elem) (cxListInsert(list, index, (type*) (elem)))
     1.9 +#define cxTypedListAt(type, list, index) ((type*)cxListAt(list, index))
    1.10 +#define cxTypedListFind(type, list, elem) (cxListFind(list, (type*) (elem)))
    1.11 +#define cxTypedListLast(type, list) ((type*)cxListLast(list))
    1.12 +
    1.13  #ifdef __cplusplus
    1.14  } /* extern "C" */
    1.15  #endif

mercurial