std.Build.ConfigHeaderStep: support sentinel-terminated strings

This commit is contained in:
Andrew Kelley 2023-02-05 10:49:57 -07:00
parent f62e3b8c0d
commit 27317eaff0

View File

@ -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 => {},
}