mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Added $converable / $castable. Simplify and corrected if try/catch parsing. Fix bug with { [A] = 1 }
This commit is contained in:
committed by
Christoffer Lerno
parent
7e0a29ef40
commit
812bd8b3d0
@@ -88,7 +88,7 @@ struct Allocator
|
||||
AllocatorFunction function;
|
||||
}
|
||||
|
||||
macro malloc($Type)
|
||||
macro malloc($Type) @builtin
|
||||
{
|
||||
return ($Type*)(mem::alloc($Type.sizeof));
|
||||
}
|
||||
@@ -147,7 +147,7 @@ fn void*! realloc_checked(void *ptr, usize new_size, usize alignment = 0)
|
||||
return thread_allocator.realloc(ptr, new_size, alignment);
|
||||
}
|
||||
|
||||
fn void free(void* ptr)
|
||||
fn void free(void* ptr) @builtin
|
||||
{
|
||||
return thread_allocator.free(ptr)!!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user