From 31a3609b28139ef42b353d907b82645679a10329 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 30 Nov 2024 23:48:14 -0500 Subject: [PATCH] some fixes to c's fixed_arena gen --- gen_c_library/c_library.cpp | 2 +- .../{fixed_arena.hpp => memory.fixed_arena.hpp} | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) rename gen_c_library/components/{fixed_arena.hpp => memory.fixed_arena.hpp} (96%) diff --git a/gen_c_library/c_library.cpp b/gen_c_library/c_library.cpp index e29a620..a0b3044 100644 --- a/gen_c_library/c_library.cpp +++ b/gen_c_library/c_library.cpp @@ -16,7 +16,7 @@ GEN_NS_END #include // for system() -#include "components/fixed_arena.hpp" +#include "components/memory.fixed_arena.hpp" #include "components/misc.hpp" using namespace gen; diff --git a/gen_c_library/components/fixed_arena.hpp b/gen_c_library/components/memory.fixed_arena.hpp similarity index 96% rename from gen_c_library/components/fixed_arena.hpp rename to gen_c_library/components/memory.fixed_arena.hpp index 8f0ff21..b5958cc 100644 --- a/gen_c_library/components/fixed_arena.hpp +++ b/gen_c_library/components/memory.fixed_arena.hpp @@ -1,7 +1,7 @@ -// #pragma once -// #include "../project/gen.hpp" +#pragma once +#include "../project/gen.hpp" -// using namespace gen; +using namespace gen; CodeBody gen_fixed_arenas() { @@ -18,13 +18,13 @@ CodeBody gen_fixed_arenas() char const* template_interface = stringize( inline void fixed_arena_init_(FixedArena_* result) { - zero_size(& result.memory[0], ); - result.arena = arena_init_from_memory(& result.memory[0], ); + zero_size(& result->memory[0], ); + result.arena = arena_init_from_memory(& result->memory[0], ); } inline ssize fixed_arena_size_remaining_(FixedArena_* fixed_arena, ssize alignment) { - return size_remaining(fixed_arena.arena, alignment); + return size_remaining(fixed_arena->arena, alignment); } );