mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
std: Expose Int parameter in std.PackedInt[Array,Slice]
This commit is contained in:
parent
c557f0c32b
commit
94780f7cd1
@ -208,6 +208,9 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim
|
||||
/// The number of elements in the packed array.
|
||||
comptime len: usize = int_count,
|
||||
|
||||
/// The integer type of the packed array.
|
||||
pub const Child = Int;
|
||||
|
||||
/// Initialize a packed array using an unpacked array
|
||||
/// or, more likely, an array literal.
|
||||
pub fn init(ints: [int_count]Int) Self {
|
||||
@ -283,6 +286,9 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type {
|
||||
bit_offset: u3,
|
||||
len: usize,
|
||||
|
||||
/// The integer type of the packed slice.
|
||||
pub const Child = Int;
|
||||
|
||||
/// Calculates the number of bytes required to store a desired count
|
||||
/// of `Int`s.
|
||||
pub fn bytesRequired(int_count: usize) usize {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user