diff --git a/core.h b/core.h index e0bf3f3..5a3cd41 100644 --- a/core.h +++ b/core.h @@ -151,6 +151,8 @@ DefineList(string, String); #define __ArrayAsList(array) { .data=(array), .length=ArrayCount(array), .capacity=ArrayCount(array) } #define AsList(listtype, ...) (listtype)__ArrayAsList(((listtype##_underlying[])__VA_ARGS__)) +// TODO(dledda): clone list +// TODO(dledda): list back element accessor #define AppendList(list, element) \ if ((list)->length < (list)->capacity) { \ (list)->data[(list)->length++] = (element); \