File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 .name = .vulkan ,
33 .fingerprint = 0xbe155a03c72db6af ,
44 .version = "0.0.0" ,
5- .minimum_zig_version = "0.16.0 " ,
5+ .minimum_zig_version = "0.17.0-dev.836+e357134f0 " ,
66 .paths = .{
77 "build.zig.zon" ,
88 "build.zig" ,
Original file line number Diff line number Diff line change @@ -1569,9 +1569,9 @@ const Renderer = struct {
15691569 try self .writer .print (
15701570 \\pub fn load({[params]s}) Self {{
15711571 \\ var self: Self = .{{ .dispatch = .{{}} }};
1572- \\ inline for (std.meta.fields (Dispatch)) |field| {{
1573- \\ if (loader({[first_arg]s}, field.name. ptr)) |cmd_ptr| {{
1574- \\ @field(self.dispatch, field.name ) = @ptrCast(cmd_ptr);
1572+ \\ inline for (@typeInfo (Dispatch).@"struct".field_names ) |field| {{
1573+ \\ if (loader({[first_arg]s}, field.ptr)) |cmd_ptr| {{
1574+ \\ @field(self.dispatch, field) = @ptrCast(cmd_ptr);
15751575 \\ }}
15761576 \\ }}
15771577 \\ return self;
Original file line number Diff line number Diff line change @@ -99,10 +99,10 @@ comptime {
9999
100100fn reallyRefAllDecls (comptime T : type ) void {
101101 switch (@typeInfo (T )) {
102- .@"struct" , .@"union" = > {
102+ inline .@"struct" , .@"union" = > | info | {
103103 reallyRefAllContainerDecls (T );
104- inline for (std . meta . fields ( T )) | field | {
105- reallyRefAllDecls (field . type );
104+ inline for (info . field_types ) | field_ty | {
105+ reallyRefAllDecls (field_ty );
106106 }
107107 },
108108 .@"enum" , .@"opaque" = > {
@@ -114,8 +114,8 @@ fn reallyRefAllDecls(comptime T: type) void {
114114
115115fn reallyRefAllContainerDecls (comptime T : type ) void {
116116 inline for (comptime std .meta .declarations (T )) | decl | {
117- if (@TypeOf (@field (T , decl . name )) == type ) {
118- reallyRefAllDecls (@field (T , decl . name ));
117+ if (@TypeOf (@field (T , decl )) == type ) {
118+ reallyRefAllDecls (@field (T , decl ));
119119 }
120120 }
121121}
You can’t perform that action at this time.
0 commit comments