feat: Get ZBA working on Zig's new stage2/stage3 compiler
This commit is contained in:
@@ -14,7 +14,7 @@ fn PtrCastPreserveCV(comptime T: type, comptime PtrToT: type, comptime NewT: typ
|
||||
fn BitType(comptime FieldType: type, comptime ValueType: type, comptime shamt: usize) type {
|
||||
const self_bit: FieldType = (1 << shamt);
|
||||
|
||||
return struct {
|
||||
return extern struct {
|
||||
bits: Bitfield(FieldType, shamt, 1),
|
||||
|
||||
pub fn set(self: anytype) void {
|
||||
@@ -63,7 +63,7 @@ pub fn Bitfield(comptime FieldType: type, comptime shamt: usize, comptime num_bi
|
||||
|
||||
const ValueType = std.meta.Int(.unsigned, num_bits);
|
||||
|
||||
return struct {
|
||||
return extern struct {
|
||||
dummy: FieldType,
|
||||
|
||||
fn field(self: anytype) PtrCastPreserveCV(@This(), @TypeOf(self), FieldType) {
|
||||
|
Reference in New Issue
Block a user