Function defineCMacro [src]
If the value is omitted, it is set to 1.
name and value need not live longer than the function call.
Prototype
pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void
Parameters
translate_c: *TranslateC
name: []const u8
value: ?[]const u8
Source
pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void {
const macro = translate_c.step.owner.fmt("{s}={s}", .{ name, value orelse "1" });
translate_c.c_macros.append(macro) catch @panic("OOM");
}