forked from mirror/vulkan-zig
Fix a whole bunch of issues exposed by ziglang/zig#9191
This also includes a workaround for the fact that @"type" refers to the builtin and not to a variable called "type". See ziglang/zig#2897.
This commit is contained in:
@@ -74,7 +74,7 @@ fn parseTypes(allocator: *Allocator, out: []registry.Declaration, types_elem: *x
|
||||
} else if (mem.eql(u8, category, "funcpointer")) {
|
||||
break :blk try parseFuncPointer(allocator, ty);
|
||||
} else if (mem.eql(u8, category, "enum")) {
|
||||
break :blk (try parseEnumAlias(allocator, ty)) orelse continue;
|
||||
break :blk (try parseEnumAlias(ty)) orelse continue;
|
||||
}
|
||||
|
||||
continue;
|
||||
@@ -297,7 +297,7 @@ fn parsePointerMeta(fields: Fields, type_info: *registry.TypeInfo, elem: *xml.El
|
||||
}
|
||||
}
|
||||
|
||||
fn parseEnumAlias(allocator: *Allocator, elem: *xml.Element) !?registry.Declaration {
|
||||
fn parseEnumAlias(elem: *xml.Element) !?registry.Declaration {
|
||||
if (elem.getAttribute("alias")) |alias| {
|
||||
const name = elem.getAttribute("name") orelse return error.InvalidRegistry;
|
||||
return registry.Declaration{
|
||||
|
||||
Reference in New Issue
Block a user