mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.Build.Step.ConfigHeader: add addIdent function
for when you need to emit a bare identifier but from a string
This commit is contained in:
@@ -109,6 +109,10 @@ pub fn create(owner: *std.Build, options: Options) *ConfigHeader {
|
||||
return config_header;
|
||||
}
|
||||
|
||||
pub fn addIdent(config_header: *ConfigHeader, name: []const u8, value: []const u8) void {
|
||||
config_header.values.put(name, .{ .ident = value }) catch @panic("OOM");
|
||||
}
|
||||
|
||||
pub fn addValue(config_header: *ConfigHeader, name: []const u8, comptime T: type, value: T) void {
|
||||
return addValueInner(config_header, name, T, value) catch @panic("OOM");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user