mirror of
https://github.com/Ed94/gencpp.git
synced 2024-12-22 15:54:45 -08:00
some fixes to c's fixed_arena gen
This commit is contained in:
parent
fbdb870986
commit
31a3609b28
@ -16,7 +16,7 @@ GEN_NS_END
|
|||||||
|
|
||||||
#include <cstdlib> // for system()
|
#include <cstdlib> // for system()
|
||||||
|
|
||||||
#include "components/fixed_arena.hpp"
|
#include "components/memory.fixed_arena.hpp"
|
||||||
#include "components/misc.hpp"
|
#include "components/misc.hpp"
|
||||||
|
|
||||||
using namespace gen;
|
using namespace gen;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// #pragma once
|
#pragma once
|
||||||
// #include "../project/gen.hpp"
|
#include "../project/gen.hpp"
|
||||||
|
|
||||||
// using namespace gen;
|
using namespace gen;
|
||||||
|
|
||||||
CodeBody gen_fixed_arenas()
|
CodeBody gen_fixed_arenas()
|
||||||
{
|
{
|
||||||
@ -18,13 +18,13 @@ CodeBody gen_fixed_arenas()
|
|||||||
char const* template_interface = stringize(
|
char const* template_interface = stringize(
|
||||||
inline
|
inline
|
||||||
void fixed_arena_init_<Name>(FixedArena_<Name>* result) {
|
void fixed_arena_init_<Name>(FixedArena_<Name>* result) {
|
||||||
zero_size(& result.memory[0], <Size>);
|
zero_size(& result->memory[0], <Size>);
|
||||||
result.arena = arena_init_from_memory(& result.memory[0], <Size>);
|
result.arena = arena_init_from_memory(& result->memory[0], <Size>);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
ssize fixed_arena_size_remaining_<Name>(FixedArena_<Name>* fixed_arena, ssize alignment) {
|
ssize fixed_arena_size_remaining_<Name>(FixedArena_<Name>* fixed_arena, ssize alignment) {
|
||||||
return size_remaining(fixed_arena.arena, alignment);
|
return size_remaining(fixed_arena->arena, alignment);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user