forked from mirror/vulkan-zig
Merge pull request #205 from DialecticalMaterialist/update-zig
Update zig
This commit is contained in:
@@ -52,7 +52,7 @@ pub fn isZigPrimitiveType(name: []const u8) bool {
|
|||||||
return false;
|
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)});
|
try w.print("{f}", .{std.zig.fmtId(id)});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ pub const SegmentIterator = struct {
|
|||||||
|
|
||||||
pub const IdRenderer = struct {
|
pub const IdRenderer = struct {
|
||||||
tags: []const []const u8,
|
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 {
|
pub fn init(allocator: Allocator, tags: []const []const u8) IdRenderer {
|
||||||
return .{
|
return .{
|
||||||
|
|||||||
@@ -102,18 +102,18 @@ pub fn main() !void {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const cwd = std.fs.cwd();
|
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) });
|
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|
|
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) });
|
std.process.fatal("failed to open input file '{s}' ({s})", .{ video_xml_path, @errorName(err) });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
null;
|
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| {
|
generator.generate(allocator, api, xml_src, maybe_video_xml_src, &aw.writer) catch |err| {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user