1
0
forked from mirror/vulkan-zig

Nullable pointer parameters

For procedure parameters which are of pointer type: if the associated
`count` parameter is marked `optional` in the XML, this commit makes the
parameter pointer type nullable.
This commit is contained in:
Peter Lef
2023-07-10 10:59:11 -04:00
parent 086276bd05
commit c7d3723710
3 changed files with 15 additions and 1 deletions

View File

@@ -449,6 +449,7 @@ fn parseFnPtrSuffix(allocator: Allocator, xctok: *XmlCTokenizer, return_type: Ty
.name = first_param.name.?,
.param_type = first_param.decl_type,
.is_buffer_len = false,
.is_optional = false,
});
while (true) {
@@ -463,6 +464,7 @@ fn parseFnPtrSuffix(allocator: Allocator, xctok: *XmlCTokenizer, return_type: Ty
.name = decl.name orelse return error.MissingTypeIdentifier,
.param_type = decl.decl_type,
.is_buffer_len = false,
.is_optional = false,
});
}