std.meta.IntType -> std.meta.Int

This commit is contained in:
Tadeo Kondrak
2020-04-28 19:10:09 -06:00
parent eb183ad9fe
commit 350b2adacd
40 changed files with 107 additions and 107 deletions

View File

@@ -34,13 +34,13 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: builtin.Endian) type {
//we bitcast the desired Int type to an unsigned version of itself
// to avoid issues with shifting signed ints.
const UnInt = std.meta.IntType(false, int_bits);
const UnInt = std.meta.Int(false, int_bits);
//The maximum container int type
const MinIo = std.meta.IntType(false, min_io_bits);
const MinIo = std.meta.Int(false, min_io_bits);
//The minimum container int type
const MaxIo = std.meta.IntType(false, max_io_bits);
const MaxIo = std.meta.Int(false, max_io_bits);
return struct {
pub fn get(bytes: []const u8, index: usize, bit_offset: u7) Int {
@@ -322,7 +322,7 @@ test "PackedIntArray" {
inline while (bits <= 256) : (bits += 1) {
//alternate unsigned and signed
const even = bits % 2 == 0;
const I = std.meta.IntType(even, bits);
const I = std.meta.Int(even, bits);
const PackedArray = PackedIntArray(I, int_count);
const expected_bytes = ((bits * int_count) + 7) / 8;
@@ -369,7 +369,7 @@ test "PackedIntSlice" {
inline while (bits <= 256) : (bits += 1) {
//alternate unsigned and signed
const even = bits % 2 == 0;
const I = std.meta.IntType(even, bits);
const I = std.meta.Int(even, bits);
const P = PackedIntSlice(I);
var data = P.init(&buffer, int_count);
@@ -399,7 +399,7 @@ test "PackedIntSlice of PackedInt(Array/Slice)" {
comptime var bits = 0;
inline while (bits <= max_bits) : (bits += 1) {
const Int = std.meta.IntType(false, bits);
const Int = std.meta.Int(false, bits);
const PackedArray = PackedIntArray(Int, int_count);
var packed_array = @as(PackedArray, undefined);