Explicitly default pNext fields again

This undoes #5, as there are still some structs which do not properly
set this value.
This commit is contained in:
Robin Voetter
2022-10-07 01:36:34 +02:00
parent cc95608912
commit 75aa7e5556

View File

@@ -220,6 +220,11 @@ fn parseContainer(allocator: Allocator, ty: *xml.Element, is_union: bool) !regis
for (members) |*member| {
const member_elem = it.next().?;
try parsePointerMeta(.{ .container = members }, &member.field_type, member_elem);
// pNext isn't always properly marked as optional, so just manually override it,
if (mem.eql(u8, member.name, "pNext")) {
member.field_type.pointer.is_optional = true;
}
}
return registry.Declaration{