Browse Source

update

master
Daniel Ledda 3 weeks ago
parent
commit
221217fd18
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      core.h

+ 2
- 0
core.h View File

@@ -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); \


Loading…
Cancel
Save