Merge branch 'master' into llvm-integration

This commit is contained in:
gingerBill
2020-02-29 09:55:25 +00:00
12 changed files with 123 additions and 72 deletions
+6 -5
View File
@@ -1141,11 +1141,12 @@ __dynamic_array_reserve :: proc(array_: rawptr, elem_size, elem_align: int, cap:
allocator := array.allocator;
new_data := allocator.procedure(allocator.data, .Resize, new_size, elem_align, array.data, old_size, 0, loc);
if new_data == nil do return false;
array.data = new_data;
array.cap = cap;
return true;
if new_data != nil || elem_size == 0 {
array.data = new_data;
array.cap = cap;
return true;
}
return false;
}
__dynamic_array_resize :: proc(array_: rawptr, elem_size, elem_align: int, len: int, loc := #caller_location) -> bool {