aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-08-26 13:22:13 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-08-26 13:23:04 -0400
commitd43c6e39f64e06960eada8cbae85a944bccacd7c (patch)
tree3d5ffae4157b88b30e276ade86c586d9d7c599a0 /core
parentf56b895c05e955856e633408f5ceeebc8594da4f (diff)
Fix #4151
The `core:mem` procs were calling the wrong `runtime` procs for their number of arguments.
Diffstat (limited to 'core')
-rw-r--r--core/mem/alloc.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/mem/alloc.odin b/core/mem/alloc.odin
index acd77241f..e51d971e1 100644
--- a/core/mem/alloc.odin
+++ b/core/mem/alloc.odin
@@ -178,11 +178,11 @@ make_dynamic_array :: proc($T: typeid/[dynamic]$E, allocator := context.allocato
}
@(require_results)
make_dynamic_array_len :: proc($T: typeid/[dynamic]$E, #any_int len: int, allocator := context.allocator, loc := #caller_location) -> (T, Allocator_Error) {
- return runtime.make_dynamic_array(T, len, allocator, loc)
+ return runtime.make_dynamic_array_len_cap(T, len, len, allocator, loc)
}
@(require_results)
make_dynamic_array_len_cap :: proc($T: typeid/[dynamic]$E, #any_int len: int, #any_int cap: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) {
- return runtime.make_dynamic_array(T, len, cap, allocator, loc)
+ return runtime.make_dynamic_array_len_cap(T, len, cap, allocator, loc)
}
@(require_results)
make_map :: proc($T: typeid/map[$K]$E, #any_int cap: int = 1<<runtime.MAP_MIN_LOG2_CAPACITY, allocator := context.allocator, loc := #caller_location) -> (m: T, err: Allocator_Error) {