authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-11-27 14:08:57-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-11-27 14:34:27-08:00
log20215a376c56edfe460b1e5e35a2377af769eac5
treecdcb8868fd65c16e1188ba4ee2a4f5fa123ad380
parentda6e80c30a52fe061d6e534636d373594bf1cd7b

prepare to remove the "Managed" variant of std.ArrayHashMap


1 files changed, 9 insertions(+), 1 deletions(-)

lib/std/array_hash_map.zig+9-1
......@@ -53,6 +53,14 @@ pub fn hashString(s: []const u8) u32 {
5353 return @as(u32, @truncate(std.hash.Wyhash.hash(0, s)));
5454}
5555
56/// Deprecated in favor of `ArrayHashMapWithAllocator` (no code changes needed)
57/// or `ArrayHashMapUnmanaged` (will need to update callsites to pass an
58/// allocator). After Zig 0.14.0 is released, `ArrayHashMapWithAllocator` will
59/// be removed and `ArrayHashMapUnmanaged` will be a deprecated alias. After
60/// Zig 0.15.0 is released, the deprecated alias `ArrayHashMapUnmanaged` will
61/// be removed.
62pub const ArrayHashMap = ArrayHashMapWithAllocator;
63
5664/// A hash table of keys and values, each stored sequentially.
5765///
5866/// Insertion order is preserved. In general, this data structure supports the same
......@@ -67,7 +75,7 @@ pub fn hashString(s: []const u8) u32 {
6775///
6876/// See `ArrayHashMapUnmanaged` for a variant of this data structure that accepts an
6977/// `Allocator` as a parameter when needed rather than storing it.
70pub fn ArrayHashMap(
78pub fn ArrayHashMapWithAllocator(
7179 comptime K: type,
7280 comptime V: type,
7381 /// A namespace that provides these two functions: