27 lines
555 B
C
27 lines
555 B
C
#define GEBS_IMPLEMENTATION
|
|
#include "../gebs.h"
|
|
|
|
typedef struct {
|
|
int *items;
|
|
size_t count, capacity;
|
|
} Ints;
|
|
|
|
int main(void)
|
|
{
|
|
Gebs_Arena *arena = gebs_arena_make(sizeof(int));
|
|
defer { gebs_arena_destroy(arena); }
|
|
|
|
Ints ints = {0};
|
|
defer { gebs_list_free_alloc(arena, &ints); }
|
|
for (size_t i = 0; i < 1000; i++) {
|
|
gebs_list_append_alloc(arena, &ints, i);
|
|
}
|
|
for (size_t i = 0; i < ints.count; i++) {
|
|
printf("%zu\n", i);
|
|
}
|
|
|
|
printf("%s\n", gebs_fmt("Hello formatting %d", 124));
|
|
|
|
return 0;
|
|
}
|