MachO: update to new std.io APIs
This commit is contained in:
8
lib/compiler/aro/aro/Diagnostics.zig
vendored
8
lib/compiler/aro/aro/Diagnostics.zig
vendored
@@ -444,7 +444,7 @@ pub fn renderMessage(comp: *Compilation, m: anytype, msg: Message) void {
|
||||
printRt(m, prop.msg, .{"{s}"}, .{&str});
|
||||
} else {
|
||||
var buf: [3]u8 = undefined;
|
||||
const str = std.fmt.bufPrint(&buf, "x{x}", .{&.{msg.extra.invalid_escape.char}}) catch unreachable;
|
||||
const str = std.fmt.bufPrint(&buf, "x{x}", .{msg.extra.invalid_escape.char}) catch unreachable;
|
||||
printRt(m, prop.msg, .{"{s}"}, .{str});
|
||||
}
|
||||
},
|
||||
@@ -525,13 +525,13 @@ fn tagKind(d: *Diagnostics, tag: Tag, langopts: LangOpts) Kind {
|
||||
}
|
||||
|
||||
const MsgWriter = struct {
|
||||
w: std.io.BufferedWriter(4096, std.fs.File.Writer),
|
||||
w: *std.fs.File.Writer,
|
||||
config: std.io.tty.Config,
|
||||
|
||||
fn init(config: std.io.tty.Config) MsgWriter {
|
||||
fn init(config: std.io.tty.Config, buffer: []u8) MsgWriter {
|
||||
std.debug.lockStdErr();
|
||||
return .{
|
||||
.w = std.io.bufferedWriter(std.fs.File.stderr().deprecatedWriter()),
|
||||
.w = std.fs.stderr().writer(buffer),
|
||||
.config = config,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user