authorgravatar for der.teufel.mail@gmail.comKrzysztof Wolicki <der.teufel.mail@gmail.com> 2024-07-07 12:28:28+02:00
committergravatar for der.teufel.mail@gmail.comKrzysztof Wolicki <der.teufel.mail@gmail.com> 2024-07-07 12:28:28+02:00
log7205756a69b2fb8641e02d23592ac12206f98052
tree5c38828013094d21a5fcdc7a9d3ec3fd8697647e
parent815022c87b34bae92d98475685425063ca36cbf7

Step.TranslateC: fix defineCMacro


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/Build/Step/TranslateC.zig+1-1
...@@ -107,7 +107,7 @@ pub fn addCheckFile(translate_c: *TranslateC, expected_matches: []const []const...@@ -107,7 +107,7 @@ pub fn addCheckFile(translate_c: *TranslateC, expected_matches: []const []const
107/// If the value is omitted, it is set to 1.107/// If the value is omitted, it is set to 1.
108/// `name` and `value` need not live longer than the function call.108/// `name` and `value` need not live longer than the function call.
109pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void {109pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void {
110 const macro = std.Build.constructranslate_cMacro(translate_c.step.owner.allocator, name, value);110 const macro = translate_c.step.owner.fmt("{s}={s}", .{ name, value orelse "1" });
111 translate_c.c_macros.append(macro) catch @panic("OOM");111 translate_c.c_macros.append(macro) catch @panic("OOM");
112}112}
113113