diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2022-06-03 00:50:12 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2022-06-03 00:50:12 +0200 |
| commit | 7ae36a21d031c3d71e9015823c61380f88b0595d (patch) | |
| tree | 8fb619e30b5a7f03f7b7416343ab796f53d74aec /src_c/main.c | |
| parent | c81812414c1b55352aac2c9bdc9b7f4951f2c6ce (diff) | |
requirements update
Diffstat (limited to 'src_c/main.c')
| -rw-r--r-- | src_c/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src_c/main.c b/src_c/main.c index 5532de0..d49db74 100644 --- a/src_c/main.c +++ b/src_c/main.c @@ -2,6 +2,7 @@ #include <stdlib.h> #include <string.h> #include <argparse.h> +#include <hat/libc_allocator.h> #include "csp.h" @@ -64,7 +65,7 @@ static int read_stream(hat_allocator_t *a, FILE *stream, opcut_str_t *json) { while (!(json->len < size)) { size += 4096; - char *data = hat_allocator_alloc(a, size, json->data); + char *data = hat_allocator_realloc(a, size, json->data); if (!data) return OPCUT_ERROR; @@ -77,7 +78,7 @@ static int read_stream(hat_allocator_t *a, FILE *stream, opcut_str_t *json) { int main(int argc, char **argv) { - hat_allocator_t *a = &hat_allocator_libc; + hat_allocator_t *a = &hat_libc_allocator; opcut_pool_t *panel_pool = opcut_pool_create(a, sizeof(opcut_panel_t)); opcut_pool_t *item_pool = opcut_pool_create(a, sizeof(opcut_item_t)); opcut_pool_t *used_pool = opcut_pool_create(a, sizeof(opcut_used_t)); |
