From 4066c2c52626105c82923bc113c8238701b534b3 Mon Sep 17 00:00:00 2001 From: DialecticalMaterialist <170803884+DialecticalMaterialist@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:15:52 +0200 Subject: [PATCH] Update zig --- src/id_render.zig | 4 ++-- src/main.zig | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/id_render.zig b/src/id_render.zig index 60c6f7c..7a8579a 100644 --- a/src/id_render.zig +++ b/src/id_render.zig @@ -52,7 +52,7 @@ pub fn isZigPrimitiveType(name: []const u8) bool { return false; } -pub fn writeIdentifier(w: *std.io.Writer, id: []const u8) !void { +pub fn writeIdentifier(w: *std.Io.Writer, id: []const u8) !void { try w.print("{f}", .{std.zig.fmtId(id)}); } @@ -121,7 +121,7 @@ pub const SegmentIterator = struct { pub const IdRenderer = struct { tags: []const []const u8, - text_cache: std.io.Writer.Allocating, + text_cache: std.Io.Writer.Allocating, pub fn init(allocator: Allocator, tags: []const []const u8) IdRenderer { return .{ diff --git a/src/main.zig b/src/main.zig index 14bd975..7f4b39d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -102,18 +102,18 @@ pub fn main() !void { }; const cwd = std.fs.cwd(); - const xml_src = cwd.readFileAlloc(allocator, xml_path, std.math.maxInt(usize)) catch |err| { + const xml_src = cwd.readFileAlloc(xml_path, allocator, .unlimited) catch |err| { std.process.fatal("failed to open input file '{s}' ({s})", .{ xml_path, @errorName(err) }); }; const maybe_video_xml_src = if (maybe_video_xml_path) |video_xml_path| - cwd.readFileAlloc(allocator, video_xml_path, std.math.maxInt(usize)) catch |err| { + cwd.readFileAlloc(video_xml_path, allocator, .unlimited) catch |err| { std.process.fatal("failed to open input file '{s}' ({s})", .{ video_xml_path, @errorName(err) }); } else null; - var aw: std.io.Writer.Allocating = .init(allocator); + var aw: std.Io.Writer.Allocating = .init(allocator); generator.generate(allocator, api, xml_src, maybe_video_xml_src, &aw.writer) catch |err| { if (debug) { return err;