Skip to content

Commit 66671d7

Browse files
fix: field parent ptr
1 parent 7c47540 commit 66671d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/phantom/platform/backends/std/sdk/step/install-pkg.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub fn create(sdk: *Sdk, pkg: *Package) !*InstallPackage {
1414

1515
self.base.init(&sdk.base, pkg, make);
1616

17-
const compile = @fieldParentPtr(@import("pkg.zig"), "base", pkg).compile;
17+
const compile = @as(*@import("pkg.zig"), @fieldParentPtr("base", pkg)).compile;
1818
self.install = b.addInstallArtifact(compile, .{});
1919
self.base.step.dependOn(&self.install.step);
2020

src/phantom/platform/backends/std/sdk/step/pkg.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pub fn create(sdk: *Sdk, options: Package.Options) !*Package {
2626
}
2727

2828
fn make(step: *std.Build.Step, _: *std.Progress.Node) !void {
29-
const pkgStep = @fieldParentPtr(Package, "step", step);
30-
const self = @fieldParentPtr(Self, "base", pkgStep);
29+
const pkgStep: *Package = @fieldParentPtr("step", step);
30+
const self: *Self = @fieldParentPtr("base", pkgStep);
3131

3232
pkgStep.output_file.path = step.owner.dupe(self.compile.generated_bin.?.path.?);
3333
}

0 commit comments

Comments
 (0)