From d556fa2cd8570363a66a7d8a2a5abf5ba306e954 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 3 Jun 2018 15:06:40 +0100 Subject: Remove special shared scope for runtime stuff --- examples/demo/demo.odin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index 54a895d0a..fbb6da8c5 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -8,13 +8,13 @@ import "core:hash" import "core:math" import "core:math/rand" import "core:os" -import "core:raw" import "core:sort" import "core:strings" import "core:types" import "core:unicode/utf16" import "core:unicode/utf8" import "core:c" +import "core:runtime" when os.OS == "windows" { import "core:atomics" @@ -352,7 +352,7 @@ parametric_polymorphism :: proc() { TABLE_SIZE_MIN :: 32; Table :: struct(Key, Value: type) { count: int, - allocator: Allocator, + allocator: mem.Allocator, slots: []Table_Slot(Key, Value), } @@ -495,12 +495,12 @@ threading_example :: proc() { fmt.println("# threading_example"); unordered_remove :: proc(array: ^[dynamic]$T, index: int, loc := #caller_location) { - __bounds_check_error_loc(loc, index, len(array)); + runtime.bounds_check_error_loc(loc, index, len(array)); array[index] = array[len(array)-1]; pop(array); } ordered_remove :: proc(array: ^[dynamic]$T, index: int, loc := #caller_location) { - __bounds_check_error_loc(loc, index, len(array)); + runtime.bounds_check_error_loc(loc, index, len(array)); copy(array[index..], array[index+1..]); pop(array); } -- cgit v1.2.3