aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/ConfigHeader.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-07-01 09:41:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-07-07 22:43:52 -0700
commitfac5fe57beb3ee34d5687da4258be22f0ed2f2f3 (patch)
treee25921f5c1793af0883120c25b0d1f7980008481 /lib/std/Build/Step/ConfigHeader.zig
parentfc310ee7bcbe7b96cc46f993277cc3933e4a0fda (diff)
downloadzig-fac5fe57beb3ee34d5687da4258be22f0ed2f2f3.tar.gz
zig-fac5fe57beb3ee34d5687da4258be22f0ed2f2f3.zip
std.io.Writer.Allocating: rename interface to writer
Diffstat (limited to 'lib/std/Build/Step/ConfigHeader.zig')
-rw-r--r--lib/std/Build/Step/ConfigHeader.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig
index d8a7a08b33..ea7da12ff6 100644
--- a/lib/std/Build/Step/ConfigHeader.zig
+++ b/lib/std/Build/Step/ConfigHeader.zig
@@ -198,7 +198,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
var aw: std.io.Writer.Allocating = .init(gpa);
defer aw.deinit();
- const bw = &aw.interface;
+ const bw = &aw.writer;
const header_text = "This file was generated by ConfigHeader using the Zig Build System.";
const c_generated_line = "/* " ++ header_text ++ " */\n";
@@ -335,7 +335,7 @@ fn render_autoconf_at(
) !void {
const build = step.owner;
const allocator = build.allocator;
- const bw = &aw.interface;
+ const bw = &aw.writer;
const used = allocator.alloc(bool, values.count()) catch @panic("OOM");
for (used) |*u| u.* = false;
@@ -753,17 +753,17 @@ fn testReplaceVariablesAutoconfAt(
expected: []const u8,
values: std.StringArrayHashMap(Value),
) !void {
- var output: std.io.Writer.Allocating = .init(allocator);
- defer output.deinit();
+ var aw: std.io.Writer.Allocating = .init(allocator);
+ defer aw.deinit();
const used = try allocator.alloc(bool, values.count());
for (used) |*u| u.* = false;
defer allocator.free(used);
- try expand_variables_autoconf_at(&output.interface, contents, values, used);
+ try expand_variables_autoconf_at(&aw.writer, contents, values, used);
for (used) |u| if (!u) return error.UnusedValue;
- try std.testing.expectEqualStrings(expected, output.getWritten());
+ try std.testing.expectEqualStrings(expected, aw.getWritten());
}
fn testReplaceVariablesCMake(