Function addCMacro [src]

Equvialent to the following C code, applied to all C source files owned by this Module: #define name value name and value need not live longer than the function call.

Prototype

pub fn addCMacro(m: *Module, name: []const u8, value: []const u8) void

Parameters

m: *Modulename: []const u8value: []const u8

Source

pub fn addCMacro(m: *Module, name: []const u8, value: []const u8) void { const b = m.owner; m.c_macros.append(b.allocator, b.fmt("-D{s}={s}", .{ name, value })) catch @panic("OOM"); }