Skip to content

Commit ff73b13

Browse files
committed
Update for Zig 0.14.0
Changes: - zig-xml updated to fix issue with passing buffers to std.unicode - std.builtin.Type field names updated to the new naming scheme
1 parent 03ee43c commit ff73b13

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
},
1111
.dependencies = .{
1212
.xml = .{
13-
.url = "git+https://github.com/ianprime0509/zig-xml?ref=0.1.0#0747fa10b28ade9a8516bc5b122dcad997bd8fa7",
14-
.hash = "1220fcb9b8da8bcfdaa18c81678c6b5cf41d63a2bf9fde7551b4390279cc473a2520",
13+
.url = "git+https://github.com/sin-ack/zig-xml?ref=zig-0.14.0-fix#353d365b18b942223c5a34181e4d8570f6935366",
14+
.hash = "12204f358836a6294cf9176db61f3b66b756d669b758abfdf4a788f8247e41bd931c",
1515
},
1616
.libxml2 = .{
1717
.url = "git+https://github.com/ianprime0509/zig-libxml2?ref=main#6cebb963e0ad5789825eb2333a4d21fab8f35a92",

src/gir.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ pub const FieldType = union(enum) {
846846

847847
fn ParseError(comptime Children: type) type {
848848
// WTF
849-
const ReaderType = @typeInfo(std.meta.fieldInfo(Children, .reader).type).Pointer.child;
849+
const ReaderType = @typeInfo(std.meta.fieldInfo(Children, .reader).type).pointer.child;
850850
return error{InvalidGir} || ReaderType.Error || Allocator.Error;
851851
}
852852

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub const std_options: std.Options = .{
3131

3232
pub fn logImpl(
3333
comptime level: log.Level,
34-
comptime scope: @Type(.EnumLiteral),
34+
comptime scope: @Type(.enum_literal),
3535
comptime format: []const u8,
3636
args: anytype,
3737
) void {

src/zig_writer.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn ZigWriter(comptime Writer: type) type {
2929
/// made into its own project.
3030
pub fn print(w: Self, comptime fmt: []const u8, args: anytype) Error!void {
3131
@setEvalBranchQuota(100_000);
32-
const arg_fields = @typeInfo(@TypeOf(args)).Struct.fields;
32+
const arg_fields = @typeInfo(@TypeOf(args)).@"struct".fields;
3333

3434
comptime var current_arg = 0;
3535
comptime var i = 0;
@@ -56,7 +56,7 @@ pub fn ZigWriter(comptime Writer: type) type {
5656
'L' => {
5757
const arg = @field(args, arg_fields[current_arg].name);
5858
const arg_type_info = @typeInfo(@TypeOf(arg));
59-
if (arg_type_info == .Pointer and arg_type_info.Pointer.size == .Slice and arg_type_info.Pointer.child == u8) {
59+
if (arg_type_info == .pointer and arg_type_info.pointer.size == .Slice and arg_type_info.pointer.child == u8) {
6060
try w.out.print("{s}", .{arg});
6161
} else {
6262
try w.out.print("{}", .{arg});

0 commit comments

Comments
 (0)