aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2025-08-13 09:33:02 +0200
committerAndrew Kelley <andrew@ziglang.org>2025-08-13 01:43:52 -0700
commitb8124d9c0b01e8ac7cd0daf93a0ed018da5f2352 (patch)
tree37ff66d809c8817ebd60871c4c296a269032b60f /lib/std/Build/Step
parent7abd62800cde3f42c0ef65126ed478a0c3d3d549 (diff)
downloadzig-b8124d9c0b01e8ac7cd0daf93a0ed018da5f2352.tar.gz
zig-b8124d9c0b01e8ac7cd0daf93a0ed018da5f2352.zip
std.io.Writer.Allocating: rename getWritten() to written()
This "get" is useless noise and was copied from FixedBufferWriter. Since this API has not yet landed in a release, now is a good time to make the breaking change to fix this.
Diffstat (limited to 'lib/std/Build/Step')
-rw-r--r--lib/std/Build/Step/ConfigHeader.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig
index 40144985cb..94cc5b668b 100644
--- a/lib/std/Build/Step/ConfigHeader.zig
+++ b/lib/std/Build/Step/ConfigHeader.zig
@@ -239,7 +239,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
},
}
- const output = aw.getWritten();
+ const output = aw.written();
man.hash.addBytes(output);
if (try step.cacheHit(&man)) {
@@ -347,10 +347,10 @@ fn render_autoconf_at(
while (line_it.next()) |line| : (line_index += 1) {
const last_line = line_it.index == line_it.buffer.len;
- const old_len = aw.getWritten().len;
+ const old_len = aw.written().len;
expand_variables_autoconf_at(bw, line, values, used) catch |err| switch (err) {
error.MissingValue => {
- const name = aw.getWritten()[old_len..];
+ const name = aw.written()[old_len..];
defer aw.shrinkRetainingCapacity(old_len);
try step.addError("{s}:{d}: error: unspecified config header value: '{s}'", .{
src_path, line_index + 1, name,
@@ -763,7 +763,7 @@ fn testReplaceVariablesAutoconfAt(
try expand_variables_autoconf_at(&aw.writer, contents, values, used);
for (used) |u| if (!u) return error.UnusedValue;
- try std.testing.expectEqualStrings(expected, aw.getWritten());
+ try std.testing.expectEqualStrings(expected, aw.written());
}
fn testReplaceVariablesCMake(