authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2026-05-03 21:04:49+01:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2026-05-03 21:42:16+01:00
logcd10ce9a67668bfdf1fd7ba57b499d93caa3c00f
treef83609a848843f5693d603bd8bd46a03e7fb00ec
parenta794287573a84f04f675efeb3278ebc00755a57b

std.fmt: Remove bufPrintZ() in favor of bufPrintSentinel()


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

lib/std/Io/Threaded.zig+1-1
......@@ -13851,7 +13851,7 @@ fn netLookupFallible(
1385113851 const name_c = name_buffer[0..name.len :0];
1385213852
1385313853 var port_buffer: [8]u8 = undefined;
13854 const port_c = std.fmt.bufPrintZ(&port_buffer, "{d}", .{options.port}) catch unreachable;
13854 const port_c = std.fmt.bufPrintSentinel(&port_buffer, "{d}", .{options.port}, 0) catch unreachable;
1385513855
1385613856 const hints: posix.addrinfo = .{
1385713857 .flags = .{ .CANONNAME = options.canonical_name_buffer != null, .NUMERICSERV = true },
lib/std/fmt.zig-5
......@@ -602,11 +602,6 @@ pub fn bufPrint(buf: []u8, comptime fmt: []const u8, args: anytype) BufPrintErro
602602 return w.buffered();
603603}
604604
605/// Deprecated in favor of `bufPrintSentinel`
606pub fn bufPrintZ(buf: []u8, comptime fmt: []const u8, args: anytype) BufPrintError![:0]u8 {
607 return try bufPrintSentinel(buf, fmt, args, 0);
608}
609
610605pub fn bufPrintSentinel(
611606 buf: []u8,
612607 comptime fmt: []const u8,