Fix file load order and allow when statements at file scope

This commit is contained in:
Ginger Bill
2017-09-20 20:38:32 +01:00
parent 333db4dc94
commit d2c1c719bd
6 changed files with 624 additions and 335 deletions
+3 -3
View File
@@ -22,11 +22,11 @@ when ODIN_OS == "windows" {
}
when ODIN_OS == "windows" {
c_long :: u32;
c_ulong :: u32;
} else when size_of(uint) == 4 {
c_long :: u32;
c_ulong :: u32;
} else {
c_long :: u64;
c_ulong :: u64;
}
c_longlong :: i64;
-3
View File
@@ -1,5 +1,3 @@
import "core:fmt.odin";
import "core:os.odin";
import "core:raw.odin";
foreign __llvm_core {
@@ -146,7 +144,6 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator.Mode,
total_size := size + alignment;
if len(arena.memory) + total_size > cap(arena.memory) {
fmt.fprintln(os.stderr, "Arena out of memory");
return nil;
}