Browse Source

add stuff

c-only
Daniel Ledda 5 months ago
parent
commit
e9290ba9f2
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      core.h

+ 2
- 0
core.h View File

@@ -143,9 +143,11 @@ struct list {
};

#define PushList(arena, type, size) (list<type>{ PushArray(arena, type, size), size, 0 })
#define EmptyList(type) (list<type>{ NULL, 0, 0 })
#define PushListZero(arena, type, size) (list<type>{ PushArrayZero(arena, type, size), size, 0 })
#define PushFullList(arena, type, size) (list<type>{ PushArray(arena, type, size), size, size })
#define PushFullListZero(arena, type, size) (list<type>{ PushArrayZero(arena, type, size), size, size })
#define ArrayAsList(type, array) (list<type>{ array, ArrayCount(array), ArrayCount(array) })

template <typename T> T *appendList(list<T> *list, T element);
template <typename T> void zeroList(list<T> *list);


Loading…
Cancel
Save