mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
prepare to remove the "Managed" variant of std.ArrayHashMap
This commit is contained in:
parent
da6e80c30a
commit
20215a376c
1 changed files with 9 additions and 1 deletions
|
|
@ -53,6 +53,14 @@ pub fn hashString(s: []const u8) u32 {
|
|||
return @as(u32, @truncate(std.hash.Wyhash.hash(0, s)));
|
||||
}
|
||||
|
||||
/// Deprecated in favor of `ArrayHashMapWithAllocator` (no code changes needed)
|
||||
/// or `ArrayHashMapUnmanaged` (will need to update callsites to pass an
|
||||
/// allocator). After Zig 0.14.0 is released, `ArrayHashMapWithAllocator` will
|
||||
/// be removed and `ArrayHashMapUnmanaged` will be a deprecated alias. After
|
||||
/// Zig 0.15.0 is released, the deprecated alias `ArrayHashMapUnmanaged` will
|
||||
/// be removed.
|
||||
pub const ArrayHashMap = ArrayHashMapWithAllocator;
|
||||
|
||||
/// A hash table of keys and values, each stored sequentially.
|
||||
///
|
||||
/// Insertion order is preserved. In general, this data structure supports the same
|
||||
|
|
@ -67,7 +75,7 @@ pub fn hashString(s: []const u8) u32 {
|
|||
///
|
||||
/// See `ArrayHashMapUnmanaged` for a variant of this data structure that accepts an
|
||||
/// `Allocator` as a parameter when needed rather than storing it.
|
||||
pub fn ArrayHashMap(
|
||||
pub fn ArrayHashMapWithAllocator(
|
||||
comptime K: type,
|
||||
comptime V: type,
|
||||
/// A namespace that provides these two functions:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue