mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
[Core] Fix more C99 compliance issues (#118)
This commit is contained in:
parent
c24a41b9e4
commit
c13eef1c1e
10 changed files with 463 additions and 467 deletions
3
generator/array_allocate_pointer.template.c
Normal file
3
generator/array_allocate_pointer.template.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$NAME$ $NAME$_Allocate_Arena(uint32_t capacity, Clay_Arena *arena) {
|
||||
return CLAY__INIT($NAME$){.capacity = capacity, .length = 0, .internalArray = ($TYPE$ *)Clay__Array_Allocate_Arena(capacity, sizeof($TYPE$), CLAY__POINTER_ALIGNMENT, arena)};
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
typedef struct
|
||||
CLAY__TYPEDEF($NAME$, struct
|
||||
{
|
||||
uint32_t capacity;
|
||||
uint32_t length;
|
||||
$TYPE$ *internalArray;
|
||||
} $NAME$;
|
||||
});
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
typedef struct
|
||||
CLAY__TYPEDEF($NAME$Slice, struct
|
||||
{
|
||||
uint32_t length;
|
||||
$TYPE$ *internalArray;
|
||||
} $NAME$Slice;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue