28 lines
548 B
C
28 lines
548 B
C
#define GEBS_NO_PREFIX
|
|
#define GEBS_IMPLEMENTATION
|
|
#include "../gebs.h"
|
|
|
|
typedef struct {
|
|
int *items;
|
|
size_t count, capacity;
|
|
} Ints;
|
|
|
|
int main(void)
|
|
{
|
|
Arena *arena = arena_make(sizeof(int));
|
|
defer { arena_destroy(arena); }
|
|
|
|
Ints ints = {0};
|
|
defer { list_free_alloc(arena, &ints); }
|
|
for (size_t i = 0; i < 1000; i++) {
|
|
list_append_alloc(arena, &ints, i);
|
|
}
|
|
for (size_t i = 0; i < ints.count; i++) {
|
|
printf("%zu\n", i);
|
|
}
|
|
|
|
printf("%s\n", fmt("Hello formatting %d", 124));
|
|
|
|
return 0;
|
|
}
|