Updated memory allocator. Fix in printf printing pointers. Added aligned_alloc to libc module. Renamed MemoryArena -> ArenaAllocator. New temp allocator. @pool(), @scoped, @tscoped macros. Bump to 0.3.2.

This commit is contained in:
Christoffer Lerno
2022-08-01 15:25:26 +02:00
parent 272f134e78
commit 550bca79e9
15 changed files with 337 additions and 153 deletions

View File

@@ -674,7 +674,7 @@ private fn NtoaType int_from_variant(variant arg, bool *is_neg)
if (arg.type.kind == TypeKind.POINTER)
{
return (NtoaType)(uptr)(void*)arg.ptr;
return (NtoaType)(uptr)*(void**)arg.ptr;
}
switch (arg)
{
@@ -873,7 +873,6 @@ private fn usize! vsnprintf(OutputFn out, void* data, char[] format, variant[] v
out_str(&param, current)?;
continue;
case 'p':
param.width = (uint)(void*.sizeof * 2);
param.flags.zeropad = true;
param.flags.hash = true;
base = 16;