clay/generator/array_define.template.c

10 lines
329 B
C
Raw Normal View History

2024-08-23 04:05:23 +00:00
typedef struct
{
uint32_t capacity;
uint32_t length;
$TYPE$ *internalArray;
} $NAME$;
$NAME$ $NAME$_Allocate_Arena(uint32_t capacity, Clay_Arena *arena) {
return ($NAME$){.capacity = capacity, .length = 0, .internalArray = ($TYPE$ *)Clay__Array_Allocate_Arena(capacity, sizeof($TYPE$), CLAY__ALIGNMENT($TYPE$), arena)};
2024-08-23 04:05:23 +00:00
}