diff options
| author | Chris Boesch <[email protected]> | 2024-04-02 22:19:17 +0000 |
|---|---|---|
| committer | Chris Boesch <[email protected]> | 2024-04-02 22:19:17 +0000 |
| commit | c0ff1b70c152603bc5680abfb1793b176125d7c8 (patch) | |
| tree | 450915190c83df13d68442813b5800dfa43675c8 /build.zig | |
| parent | ba4709b20f5d1ad1e1962db41d59b5e7f7c03fea (diff) | |
| parent | f06c1f27d13b3ec380049ef58e5e8eee566172ac (diff) | |
| download | ziglings-c0ff1b70c152603bc5680abfb1793b176125d7c8.tar.xz ziglings-c0ff1b70c152603bc5680abfb1793b176125d7c8.zip | |
Merge pull request 'WIP - fix breaking zig change to @fieldParentPtr' (#72) from kamidev/exercises:fix_zig_breaking_pr_19470 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/72
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -247,7 +247,7 @@ const ZiglingStep = struct { fn make(step: *Step, prog_node: *std.Progress.Node) !void { // NOTE: Using exit code 2 will prevent the Zig compiler to print the message: // "error: the following build command failed with exit code 1:..." - const self = @fieldParentPtr(ZiglingStep, "step", step); + const self: *ZiglingStep = @alignCast(@fieldParentPtr("step", step)); if (self.exercise.skip) { print("Skipping {s}\n\n", .{self.exercise.main_file}); @@ -495,8 +495,7 @@ const PrintStep = struct { } fn make(step: *Step, _: *std.Progress.Node) !void { - const self = @fieldParentPtr(PrintStep, "step", step); - + const self: *PrintStep = @alignCast(@fieldParentPtr("step", step)); print("{s}", .{self.message}); } }; |
