| author | |
| committer | |
| log | 0282c2a924054472ccc8d82325e8393442381760 |
| tree | c86ef0cff0e01937885551c9768e114b23b87f90 |
| parent | 4374ce51b0ffdaa317b6678d6622ecb88877f7f9 |
6 files changed, 11 insertions(+), 11 deletions(-)
lib/std/array_hash_map.zig+2-2| ... | @@ -54,7 +54,7 @@ pub fn hashString(s: []const u8) u32 { | ... | @@ -54,7 +54,7 @@ pub fn hashString(s: []const u8) u32 { |
| 54 | 54 | ||
| 55 | /// Insertion order is preserved. | 55 | /// Insertion order is preserved. |
| 56 | /// Deletions perform a "swap removal" on the entries list. | 56 | /// Deletions perform a "swap removal" on the entries list. |
| 57 | /// Modifying the hash map while iterating is allowed, however one must understand | 57 | /// Modifying the hash map while iterating is allowed, however, one must understand |
| 58 | /// the (well defined) behavior when mixing insertions and deletions with iteration. | 58 | /// the (well defined) behavior when mixing insertions and deletions with iteration. |
| 59 | /// For a hash map that can be initialized directly that does not store an Allocator | 59 | /// For a hash map that can be initialized directly that does not store an Allocator |
| 60 | /// field, see `ArrayHashMapUnmanaged`. | 60 | /// field, see `ArrayHashMapUnmanaged`. |
| ... | @@ -448,7 +448,7 @@ pub fn ArrayHashMap( | ... | @@ -448,7 +448,7 @@ pub fn ArrayHashMap( |
| 448 | /// General purpose hash table. | 448 | /// General purpose hash table. |
| 449 | /// Insertion order is preserved. | 449 | /// Insertion order is preserved. |
| 450 | /// Deletions perform a "swap removal" on the entries list. | 450 | /// Deletions perform a "swap removal" on the entries list. |
| 451 | /// Modifying the hash map while iterating is allowed, however one must understand | 451 | /// Modifying the hash map while iterating is allowed, however, one must understand |
| 452 | /// the (well defined) behavior when mixing insertions and deletions with iteration. | 452 | /// the (well defined) behavior when mixing insertions and deletions with iteration. |
| 453 | /// This type does not store an Allocator field - the Allocator must be passed in | 453 | /// This type does not store an Allocator field - the Allocator must be passed in |
| 454 | /// with each function call that requires it. See `ArrayHashMap` for a type that stores | 454 | /// with each function call that requires it. See `ArrayHashMap` for a type that stores |
lib/std/array_list.zig+2-2| ... | @@ -31,7 +31,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { | ... | @@ -31,7 +31,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 31 | return struct { | 31 | return struct { |
| 32 | const Self = @This(); | 32 | const Self = @This(); |
| 33 | /// Contents of the list. Pointers to elements in this slice are | 33 | /// Contents of the list. Pointers to elements in this slice are |
| 34 | /// **invalid after resizing operations** on the ArrayList, unless the | 34 | /// **invalid after resizing operations** on the ArrayList unless the |
| 35 | /// operation explicitly either: (1) states otherwise or (2) lists the | 35 | /// operation explicitly either: (1) states otherwise or (2) lists the |
| 36 | /// invalidated pointers. | 36 | /// invalidated pointers. |
| 37 | /// | 37 | /// |
| ... | @@ -527,7 +527,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ | ... | @@ -527,7 +527,7 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ |
| 527 | return struct { | 527 | return struct { |
| 528 | const Self = @This(); | 528 | const Self = @This(); |
| 529 | /// Contents of the list. Pointers to elements in this slice are | 529 | /// Contents of the list. Pointers to elements in this slice are |
| 530 | /// **invalid after resizing operations** on the ArrayList, unless the | 530 | /// **invalid after resizing operations** on the ArrayList unless the |
| 531 | /// operation explicitly either: (1) states otherwise or (2) lists the | 531 | /// operation explicitly either: (1) states otherwise or (2) lists the |
| 532 | /// invalidated pointers. | 532 | /// invalidated pointers. |
| 533 | /// | 533 | /// |
lib/std/buf_map.zig+1-1| ... | @@ -4,7 +4,7 @@ const mem = std.mem; | ... | @@ -4,7 +4,7 @@ const mem = std.mem; |
| 4 | const Allocator = mem.Allocator; | 4 | const Allocator = mem.Allocator; |
| 5 | const testing = std.testing; | 5 | const testing = std.testing; |
| 6 | 6 | ||
| 7 | /// BufMap copies keys and values before they go into the map, and | 7 | /// BufMap copies keys and values before they go into the map and |
| 8 | /// frees them when they get removed. | 8 | /// frees them when they get removed. |
| 9 | pub const BufMap = struct { | 9 | pub const BufMap = struct { |
| 10 | hash_map: BufMapHashMap, | 10 | hash_map: BufMapHashMap, |
lib/std/hash_map.zig+1-1| ... | @@ -350,7 +350,7 @@ pub fn verifyContext( | ... | @@ -350,7 +350,7 @@ pub fn verifyContext( |
| 350 | /// General purpose hash table. | 350 | /// General purpose hash table. |
| 351 | /// No order is guaranteed and any modification invalidates live iterators. | 351 | /// No order is guaranteed and any modification invalidates live iterators. |
| 352 | /// It provides fast operations (lookup, insertion, deletion) with quite high | 352 | /// It provides fast operations (lookup, insertion, deletion) with quite high |
| 353 | /// load factors (up to 80% by default) for a low memory usage. | 353 | /// load factors (up to 80% by default) for low memory usage. |
| 354 | /// For a hash map that can be initialized directly that does not store an Allocator | 354 | /// For a hash map that can be initialized directly that does not store an Allocator |
| 355 | /// field, see `HashMapUnmanaged`. | 355 | /// field, see `HashMapUnmanaged`. |
| 356 | /// If iterating over the table entries is a strong usecase and needs to be fast, | 356 | /// If iterating over the table entries is a strong usecase and needs to be fast, |
lib/std/os/linux/seccomp.zig+2-2| ... | @@ -29,8 +29,8 @@ | ... | @@ -29,8 +29,8 @@ |
| 29 | //! which is dependant on the ABI. Since BPF programs execute in a 32-bit | 29 | //! which is dependant on the ABI. Since BPF programs execute in a 32-bit |
| 30 | //! machine, validation of 64-bit arguments necessitates two load-and-compare | 30 | //! machine, validation of 64-bit arguments necessitates two load-and-compare |
| 31 | //! instructions for the upper and lower words. | 31 | //! instructions for the upper and lower words. |
| 32 | //! 3. A further wrinkle to the above is endianess. Unlike network packets, | 32 | //! 3. A further wrinkle to the above is endianness. Unlike network packets, |
| 33 | //! syscall data shares the endianess of the target machine. A filter | 33 | //! syscall data shares the endianness of the target machine. A filter |
| 34 | //! compiled on a little-endian machine will not work on a big-endian one, | 34 | //! compiled on a little-endian machine will not work on a big-endian one, |
| 35 | //! and vice-versa. For example: Checking the upper 32-bits of `data.arg1` | 35 | //! and vice-versa. For example: Checking the upper 32-bits of `data.arg1` |
| 36 | //! requires a load at `@offsetOf(data, "arg1") + 4` on big-endian systems | 36 | //! requires a load at `@offsetOf(data, "arg1") + 4` on big-endian systems |
lib/std/packed_int_array.zig+3-3| ... | @@ -182,7 +182,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type { | ... | @@ -182,7 +182,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type { |
| 182 | 182 | ||
| 183 | /// Creates a bit-packed array of `Int`. Non-byte-multiple integers | 183 | /// Creates a bit-packed array of `Int`. Non-byte-multiple integers |
| 184 | /// will take up less memory in PackedIntArray than in a normal array. | 184 | /// will take up less memory in PackedIntArray than in a normal array. |
| 185 | /// Elements are packed using native endianess and without storing any | 185 | /// Elements are packed using native endianness and without storing any |
| 186 | /// meta data. PackedArray(i3, 8) will occupy exactly 3 bytes | 186 | /// meta data. PackedArray(i3, 8) will occupy exactly 3 bytes |
| 187 | /// of memory. | 187 | /// of memory. |
| 188 | pub fn PackedIntArray(comptime Int: type, comptime int_count: usize) type { | 188 | pub fn PackedIntArray(comptime Int: type, comptime int_count: usize) type { |
| ... | @@ -261,7 +261,7 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim | ... | @@ -261,7 +261,7 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | /// Create a PackedIntSliceEndian of the array using `NewInt` as the integer type | 263 | /// Create a PackedIntSliceEndian of the array using `NewInt` as the integer type |
| 264 | /// and `new_endian` as the new endianess. `NewInt`'s bit width must fit evenly | 264 | /// and `new_endian` as the new endianness. `NewInt`'s bit width must fit evenly |
| 265 | /// within the array's `Int`'s total bits. | 265 | /// within the array's `Int`'s total bits. |
| 266 | pub fn sliceCastEndian(self: *Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) { | 266 | pub fn sliceCastEndian(self: *Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) { |
| 267 | return Io.sliceCast(&self.bytes, NewInt, new_endian, 0, int_count); | 267 | return Io.sliceCast(&self.bytes, NewInt, new_endian, 0, int_count); |
| ... | @@ -336,7 +336,7 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type { | ... | @@ -336,7 +336,7 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type { |
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | /// Create a PackedIntSliceEndian of the slice using `NewInt` as the integer type | 338 | /// Create a PackedIntSliceEndian of the slice using `NewInt` as the integer type |
| 339 | /// and `new_endian` as the new endianess. `NewInt`'s bit width must fit evenly | 339 | /// and `new_endian` as the new endianness. `NewInt`'s bit width must fit evenly |
| 340 | /// within the slice's `Int`'s total bits. | 340 | /// within the slice's `Int`'s total bits. |
| 341 | pub fn sliceCastEndian(self: Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) { | 341 | pub fn sliceCastEndian(self: Self, comptime NewInt: type, comptime new_endian: Endian) PackedIntSliceEndian(NewInt, new_endian) { |
| 342 | return Io.sliceCast(self.bytes, NewInt, new_endian, self.bit_offset, self.len); | 342 | return Io.sliceCast(self.bytes, NewInt, new_endian, self.bit_offset, self.len); |