28 lines
536 B
C
28 lines
536 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 = gebs_arena_get(4*1024);
|
|
defer { arena_destroy(&arena); }
|
|
|
|
Ints ints = {0};
|
|
for (size_t i = 0; i < 100; i++) {
|
|
list_append_alloc(&arena, &ints, i);
|
|
gebs_arena_reset(&arena);
|
|
}
|
|
for (size_t i = 0; i < ints.count; i++) {
|
|
printf("%zu\n", i);
|
|
}
|
|
|
|
printf("%s\n", fmt("Hello formatting %d", 124));
|
|
|
|
return 0;
|
|
}
|