Skip to content

Commit d72ef35

Browse files
committed
wip
1 parent 07e469c commit d72ef35

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

example/src/main.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
//! is to delete this file and start with root.zig instead.
44

55
pub fn main() !void {
6-
// Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
6+
// Prints to stderr (it's a shortcut based on `std.Io.getStdErr()`)
77
std.debug.print("All your {s} are belong to us.\n", .{"codebase"});
88

99
// stdout is for the actual output of your application, for example if you
1010
// are implementing gzip, then only the compressed bytes should be sent to
1111
// stdout, not any debugging messages.
12-
const stdout_file = std.io.getStdOut().writer();
13-
var bw = std.io.bufferedWriter(stdout_file);
12+
const stdout_file = std.Io.getStdOut().writer();
13+
var bw = std.Io.bufferedWriter(stdout_file);
1414
const stdout = bw.writer();
1515

1616
try stdout.print("Run `zig build test` to run the tests.\n", .{});

src/runner-dot.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ pub fn main() !void {
1111

1212
pub fn build_main(b: *std.Build, targets: []const []const u8, ctx: ?*anyopaque) !void {
1313
_ = ctx;
14-
const stdout = std.io.getStdOut().writer();
14+
var stdout_file = std.fs.File.stdout().writer(&.{});
15+
const stdout = &stdout_file.interface;
1516
try stdout.writeAll(DotFileWriter.header);
1617
var gpa_alloc = std.heap.GeneralPurposeAllocator(.{}){};
1718
defer _ = gpa_alloc.deinit();

0 commit comments

Comments
 (0)