// @todo(judah): replace array_add init :: inline (arr: *[..]$T, allocator: Allocator) { arr.allocator = allocator; } append :: inline (arr: *[..]$T, value: T) -> *T { ptr := basic.array_add(arr,, allocator = arr.allocator); ptr.* = value; return ptr; } append :: inline (arr: *[..]$T, values: ..T) -> *T { count := arr.count; basic.array_add(arr, ..values,, allocator = arr.allocator); return *arr.data[count]; } append :: inline (arr: *[..]$T) -> *T { return basic.array_add(arr,, allocator = arr.allocator); } resize :: inline (arr: *[..]$T, new_size: int) { if new_size <= arr.allocated return; basic.array_reserve(arr, new_size,, allocator = arr.allocator); } reset :: inline (arr: *[..]$T) { arr.count = 0; } #scope_file; mem :: #import "jc/memory"; basic :: #import "Basic"; // @future