Skip to content

Commit e96b967

Browse files
committed
how the hell did these casts break
1 parent 9c34f6d commit e96b967

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/link.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ pub const File = struct {
231231
const emit = base.emit;
232232
if (base.child_pid) |pid| {
233233
if (builtin.os.tag == .windows) {
234-
base.cast(Coff).?.ptraceAttach(pid) catch |err| {
234+
base.cast(.coff).?.ptraceAttach(pid) catch |err| {
235235
log.warn("attaching failed with error: {s}", .{@errorName(err)});
236236
};
237237
} else {
@@ -249,7 +249,7 @@ pub const File = struct {
249249
.linux => std.posix.ptrace(std.os.linux.PTRACE.ATTACH, pid, 0, 0) catch |err| {
250250
log.warn("ptrace failure: {s}", .{@errorName(err)});
251251
},
252-
.macos => base.cast(MachO).?.ptraceAttach(pid) catch |err| {
252+
.macos => base.cast(.macho).?.ptraceAttach(pid) catch |err| {
253253
log.warn("attaching failed with error: {s}", .{@errorName(err)});
254254
},
255255
.windows => unreachable,
@@ -317,10 +317,10 @@ pub const File = struct {
317317

318318
if (base.child_pid) |pid| {
319319
switch (builtin.os.tag) {
320-
.macos => base.cast(MachO).?.ptraceDetach(pid) catch |err| {
320+
.macos => base.cast(.macho).?.ptraceDetach(pid) catch |err| {
321321
log.warn("detaching failed with error: {s}", .{@errorName(err)});
322322
},
323-
.windows => base.cast(Coff).?.ptraceDetach(pid),
323+
.windows => base.cast(.coff).?.ptraceDetach(pid),
324324
else => return error.HotSwapUnavailableOnHostOperatingSystem,
325325
}
326326
}

src/link/MachO/ZigObject.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ fn isThreadlocal(macho_file: *MachO, nav_index: InternPool.Nav.Index) bool {
15321532
return switch (ip.indexToKey(ip.getNav(nav_index).status.resolved.val)) {
15331533
.variable => |variable| variable.is_threadlocal,
15341534
.@"extern" => |@"extern"| @"extern".is_threadlocal,
1535-
else => unreachable,
1535+
else => false,
15361536
};
15371537
}
15381538

0 commit comments

Comments
 (0)