mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Updated scope code and variable tracking. Added trailing body macros.
This commit is contained in:
committed by
Christoffer Lerno
parent
bf8e665120
commit
dafe0e6fb6
@@ -330,6 +330,8 @@ static inline void* _expand(void *vec, size_t element_size)
|
||||
#define CONCAT(a, b) CONCAT_INNER(a, b)
|
||||
#define VECEACH(_vec, _index) \
|
||||
for (unsigned _index = 0, CONCAT(__vecsize_, __LINE__) = vec_size(_vec); _index < CONCAT(__vecsize_, __LINE__); _index++)
|
||||
#define foreach(_vec, _index) \
|
||||
for (unsigned _index = 0, CONCAT(__vecsize_, __LINE__) = vec_size(_vec); _index < CONCAT(__vecsize_, __LINE__); _index++)
|
||||
|
||||
|
||||
#define VECNEW(_type, _capacity) ((_type *)(_vec_new(sizeof(_type), _capacity) + 1))
|
||||
|
||||
Reference in New Issue
Block a user