by mcountryman · 6y ago · 0 comments
std/debug.zig:
pub fn print(comptime fmt: []const u8, args: anytype) void {
const held = stderr_mutex.acquire();
defer held.release();
const stderr = io.getStdErr().writer();
nosuspend stderr.print(fmt, args) catch return;
}
io/writer.zig: pub fn print(self: Self, comptime format: []const u8, args: anytype) Error!void {
return std.fmt.format(self, format, args);
}
std/fmt.zig: pub fn format(
writer: anytype,
comptime fmt: []const u8,
args: anytype,
) !void {
...
It's all based on the language features and the actual implementations of zig's standard library code, and at least I don't see anything "wrapped" there, and nothing what C++, C or asm programmers understand as "a macro".I didn't actually check the zig std source. I was referring to what I was seeing in radare2 :)