feat: vars initialization

This commit is contained in:
william.valenduc 2026-01-18 01:36:04 +00:00
parent 953b05fba0
commit 096a7d81a0

View file

@ -6,6 +6,7 @@
#include "io_backend/io_backend.h" #include "io_backend/io_backend.h"
#include "parser/parser.h" #include "parser/parser.h"
#include "utils/args/args.h" #include "utils/args/args.h"
#include "utils/vars/vars.h"
// === Error codes // === Error codes
@ -28,6 +29,14 @@ int main(int argc, char **argv)
} }
// args_print(&options); // args_print(&options);
// Initialize variables hash map
struct hash_map *vars = vars_init();
if (vars == NULL)
{
fprintf(stderr, "Error: Failed to initialize variables hash map\n");
return ERR_MALLOC;
}
// Create the IO-Backend context struct // Create the IO-Backend context struct
struct iob_context *io_context = malloc(sizeof(struct iob_context)); struct iob_context *io_context = malloc(sizeof(struct iob_context));
if (io_context == NULL) if (io_context == NULL)