Update zig

This commit is contained in:
DialecticalMaterialist
2025-09-04 14:15:52 +02:00
parent c9c4dae703
commit 4066c2c526
2 changed files with 5 additions and 5 deletions

View File

@@ -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 .{

View File

@@ -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;