update zig

This commit is contained in:
Mitchell Hashimoto
2024-03-13 09:14:12 -07:00
parent 13c5a70da7
commit b48d24a546
11 changed files with 18 additions and 18 deletions

View File

@@ -68,7 +68,7 @@ fn writeFishCompletions(writer: anytype) !void {
try writer.writeAll("\"");
},
.Struct => |info| {
if (!@hasDecl(field.type, "parseCLI") and info.layout == .Packed) {
if (!@hasDecl(field.type, "parseCLI") and info.layout == .@"packed") {
try writer.writeAll(" -a \"");
for (info.fields, 0..) |f, i| {
if (i > 0) try writer.writeAll(" ");

View File

@@ -281,7 +281,7 @@ fn parseIntoField(
fn parsePackedStruct(comptime T: type, v: []const u8) !T {
const info = @typeInfo(T).Struct;
assert(info.layout == .Packed);
assert(info.layout == .@"packed");
var result: T = .{};

View File

@@ -1982,7 +1982,7 @@ fn cloneValue(alloc: Allocator, comptime T: type, src: T) !T {
.Struct => |info| {
// Packed structs we can return directly as copies.
assert(info.layout == .Packed);
assert(info.layout == .@"packed");
return src;
},

View File

@@ -63,7 +63,7 @@ fn getValue(ptr_raw: *anyopaque, value: anytype) bool {
// Packed structs that are less than or equal to the
// size of a C int can be passed directly as their
// bit representation.
if (info.layout != .Packed) return false;
if (info.layout != .@"packed") return false;
const Backing = info.backing_integer orelse return false;
if (@bitSizeOf(Backing) > @bitSizeOf(c_uint)) return false;

View File

@@ -98,7 +98,7 @@ pub fn formatEntry(
return;
} else switch (info.layout) {
// Packed structs we special case.
.Packed => {
.@"packed" => {
try writer.print("{s} = ", .{name});
inline for (info.fields, 0..) |field, i| {
if (i > 0) try writer.print(",", .{});

View File

@@ -956,8 +956,8 @@ fn bufferCompleted(
// If our health value hasn't changed, then we do nothing. We don't
// do a cmpxchg here because strict atomicity isn't important.
if (self.health.load(.SeqCst) != health) {
self.health.store(health, .SeqCst);
if (self.health.load(.seq_cst) != health) {
self.health.store(health, .seq_cst);
// Our health value changed, so we notify the surface so that it
// can do something about it.

View File

@@ -89,7 +89,7 @@ pub const ModePacked = packed_struct: {
}
break :packed_struct @Type(.{ .Struct = .{
.layout = .Packed,
.layout = .@"packed",
.fields = &fields,
.decls = &.{},
.is_tuple = false,