commit 27317eaff08453792ae2d3bd0c96f81be8a26bfc (tree)
parent f62e3b8c0dd232bddb559405b00c1c1c4815f359
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sun, 5 Feb 2023 10:49:57 -0700
std.Build.ConfigHeaderStep: support sentinel-terminated strings
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/std/Build/ConfigHeaderStep.zig b/lib/std/Build/ConfigHeaderStep.zig
@@ -125,6 +125,12 @@ fn putValue(self: *ConfigHeaderStep, field_name: []const u8, comptime T: type, v
return;
}
},
+ .Int => {
+ if (ptr.size == .Slice and ptr.child == u8) {
+ try self.values.put(field_name, .{ .string = v });
+ return;
+ }
+ },
else => {},
}