mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-10 21:31:37 -07:00
Match statements; Type System change (Type_Record for all sum and product types)
This commit is contained in:
@@ -365,13 +365,14 @@ __default_allocator_proc :: proc(allocator_data: rawptr, mode: AllocationMode,
|
||||
size, alignment: int,
|
||||
old_memory: rawptr, old_size: int, flags: u64) -> rawptr {
|
||||
using AllocationMode
|
||||
if mode == ALLOC {
|
||||
match mode {
|
||||
case ALLOC:
|
||||
return heap_alloc(size)
|
||||
} else if mode == RESIZE {
|
||||
case RESIZE:
|
||||
return default_resize_align(old_memory, old_size, size, alignment)
|
||||
} else if mode == DEALLOC {
|
||||
case DEALLOC:
|
||||
heap_free(old_memory)
|
||||
} else if mode == DEALLOC_ALL {
|
||||
case DEALLOC_ALL:
|
||||
// NOTE(bill): Does nothing
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user