aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-03-19 12:27:20 +0100
committerJacob Young <jacobly0@users.noreply.github.com>2024-03-30 20:50:48 -0400
commite409afb79bcadeabd2d5d4cc3cd5dcc54a964e94 (patch)
treed09f9cc93ce8c44e5769e9124a0bd488a257345e /lib/std/Build
parent9b2345e182090e2f4c57e7684ec9739f195fdb1d (diff)
downloadzig-e409afb79bcadeabd2d5d4cc3cd5dcc54a964e94.tar.gz
zig-e409afb79bcadeabd2d5d4cc3cd5dcc54a964e94.zip
Update uses of `@fieldParentPtr` to pass a pointer type
Diffstat (limited to 'lib/std/Build')
-rw-r--r--lib/std/Build/Step.zig2
-rw-r--r--lib/std/Build/Step/CheckFile.zig2
-rw-r--r--lib/std/Build/Step/CheckObject.zig2
-rw-r--r--lib/std/Build/Step/Compile.zig2
-rw-r--r--lib/std/Build/Step/ConfigHeader.zig2
-rw-r--r--lib/std/Build/Step/Fmt.zig2
-rw-r--r--lib/std/Build/Step/InstallArtifact.zig2
-rw-r--r--lib/std/Build/Step/InstallDir.zig2
-rw-r--r--lib/std/Build/Step/InstallFile.zig2
-rw-r--r--lib/std/Build/Step/ObjCopy.zig2
-rw-r--r--lib/std/Build/Step/Options.zig2
-rw-r--r--lib/std/Build/Step/RemoveDir.zig2
-rw-r--r--lib/std/Build/Step/Run.zig2
-rw-r--r--lib/std/Build/Step/TranslateC.zig2
-rw-r--r--lib/std/Build/Step/WriteFile.zig2
15 files changed, 15 insertions, 15 deletions
diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig
index 48af9e54d6..67e1b0ed58 100644
--- a/lib/std/Build/Step.zig
+++ b/lib/std/Build/Step.zig
@@ -231,7 +231,7 @@ fn makeNoOp(step: *Step, prog_node: *std.Progress.Node) anyerror!void {
pub fn cast(step: *Step, comptime T: type) ?*T {
if (step.id == T.base_id) {
- return @fieldParentPtr(T, "step", step);
+ return @fieldParentPtr(*T, "step", step);
}
return null;
}
diff --git a/lib/std/Build/Step/CheckFile.zig b/lib/std/Build/Step/CheckFile.zig
index d072865922..9dfb94a67d 100644
--- a/lib/std/Build/Step/CheckFile.zig
+++ b/lib/std/Build/Step/CheckFile.zig
@@ -49,7 +49,7 @@ pub fn setName(self: *CheckFile, name: []const u8) void {
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const b = step.owner;
- const self = @fieldParentPtr(CheckFile, "step", step);
+ const self = @fieldParentPtr(*CheckFile, "step", step);
const src_path = self.source.getPath(b);
const contents = fs.cwd().readFileAlloc(b.allocator, src_path, self.max_bytes) catch |err| {
diff --git a/lib/std/Build/Step/CheckObject.zig b/lib/std/Build/Step/CheckObject.zig
index c5eb1f776b..a1c3bbcf14 100644
--- a/lib/std/Build/Step/CheckObject.zig
+++ b/lib/std/Build/Step/CheckObject.zig
@@ -530,7 +530,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const b = step.owner;
const gpa = b.allocator;
- const self = @fieldParentPtr(CheckObject, "step", step);
+ const self = @fieldParentPtr(*CheckObject, "step", step);
const src_path = self.source.getPath(b);
const contents = fs.cwd().readFileAllocOptions(
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig
index 9c1354fd30..f3182b0258 100644
--- a/lib/std/Build/Step/Compile.zig
+++ b/lib/std/Build/Step/Compile.zig
@@ -918,7 +918,7 @@ fn getGeneratedFilePath(self: *Compile, comptime tag_name: []const u8, asking_st
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
const b = step.owner;
const arena = b.allocator;
- const self = @fieldParentPtr(Compile, "step", step);
+ const self = @fieldParentPtr(*Compile, "step", step);
var zig_args = ArrayList([]const u8).init(arena);
defer zig_args.deinit();
diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig
index 9c2f5d0826..a26bec4692 100644
--- a/lib/std/Build/Step/ConfigHeader.zig
+++ b/lib/std/Build/Step/ConfigHeader.zig
@@ -167,7 +167,7 @@ fn putValue(self: *ConfigHeader, field_name: []const u8, comptime T: type, v: T)
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const b = step.owner;
- const self = @fieldParentPtr(ConfigHeader, "step", step);
+ const self = @fieldParentPtr(*ConfigHeader, "step", step);
const gpa = b.allocator;
const arena = b.allocator;
diff --git a/lib/std/Build/Step/Fmt.zig b/lib/std/Build/Step/Fmt.zig
index 4ff9d4e589..a46ca2578e 100644
--- a/lib/std/Build/Step/Fmt.zig
+++ b/lib/std/Build/Step/Fmt.zig
@@ -47,7 +47,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
const b = step.owner;
const arena = b.allocator;
- const self = @fieldParentPtr(Fmt, "step", step);
+ const self = @fieldParentPtr(*Fmt, "step", step);
var argv: std.ArrayListUnmanaged([]const u8) = .{};
try argv.ensureUnusedCapacity(arena, 2 + 1 + self.paths.len + 2 * self.exclude_paths.len);
diff --git a/lib/std/Build/Step/InstallArtifact.zig b/lib/std/Build/Step/InstallArtifact.zig
index b9c3acfbc9..9afab1925f 100644
--- a/lib/std/Build/Step/InstallArtifact.zig
+++ b/lib/std/Build/Step/InstallArtifact.zig
@@ -121,7 +121,7 @@ pub fn create(owner: *std.Build, artifact: *Step.Compile, options: Options) *Ins
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
- const self = @fieldParentPtr(InstallArtifact, "step", step);
+ const self = @fieldParentPtr(*InstallArtifact, "step", step);
const dest_builder = step.owner;
const cwd = fs.cwd();
diff --git a/lib/std/Build/Step/InstallDir.zig b/lib/std/Build/Step/InstallDir.zig
index 7472dba2a7..ce71b3773c 100644
--- a/lib/std/Build/Step/InstallDir.zig
+++ b/lib/std/Build/Step/InstallDir.zig
@@ -63,7 +63,7 @@ pub fn create(owner: *std.Build, options: Options) *InstallDirStep {
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
- const self = @fieldParentPtr(InstallDirStep, "step", step);
+ const self = @fieldParentPtr(*InstallDirStep, "step", step);
const dest_builder = self.dest_builder;
const arena = dest_builder.allocator;
const dest_prefix = dest_builder.getInstallPath(self.options.install_dir, self.options.install_subdir);
diff --git a/lib/std/Build/Step/InstallFile.zig b/lib/std/Build/Step/InstallFile.zig
index f7487de598..0c61572f5c 100644
--- a/lib/std/Build/Step/InstallFile.zig
+++ b/lib/std/Build/Step/InstallFile.zig
@@ -43,7 +43,7 @@ pub fn create(
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const src_builder = step.owner;
- const self = @fieldParentPtr(InstallFile, "step", step);
+ const self = @fieldParentPtr(*InstallFile, "step", step);
const dest_builder = self.dest_builder;
const full_src_path = self.source.getPath2(src_builder, step);
const full_dest_path = dest_builder.getInstallPath(self.dir, self.dest_rel_path);
diff --git a/lib/std/Build/Step/ObjCopy.zig b/lib/std/Build/Step/ObjCopy.zig
index 5ad123f89f..972681723f 100644
--- a/lib/std/Build/Step/ObjCopy.zig
+++ b/lib/std/Build/Step/ObjCopy.zig
@@ -92,7 +92,7 @@ pub fn getOutputSeparatedDebug(self: *const ObjCopy) ?std.Build.LazyPath {
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
const b = step.owner;
- const self = @fieldParentPtr(ObjCopy, "step", step);
+ const self = @fieldParentPtr(*ObjCopy, "step", step);
var man = b.graph.cache.obtain();
defer man.deinit();
diff --git a/lib/std/Build/Step/Options.zig b/lib/std/Build/Step/Options.zig
index 436c7fb8e7..59f16f5b42 100644
--- a/lib/std/Build/Step/Options.zig
+++ b/lib/std/Build/Step/Options.zig
@@ -415,7 +415,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const b = step.owner;
- const self = @fieldParentPtr(Options, "step", step);
+ const self = @fieldParentPtr(*Options, "step", step);
for (self.args.items) |item| {
self.addOption(
diff --git a/lib/std/Build/Step/RemoveDir.zig b/lib/std/Build/Step/RemoveDir.zig
index 7a2a56771a..4eedf563a8 100644
--- a/lib/std/Build/Step/RemoveDir.zig
+++ b/lib/std/Build/Step/RemoveDir.zig
@@ -28,7 +28,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const b = step.owner;
- const self = @fieldParentPtr(RemoveDir, "step", step);
+ const self = @fieldParentPtr(*RemoveDir, "step", step);
b.build_root.handle.deleteTree(self.dir_path) catch |err| {
if (b.build_root.path) |base| {
diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig
index cb1ed7e7dc..b8f213b8f7 100644
--- a/lib/std/Build/Step/Run.zig
+++ b/lib/std/Build/Step/Run.zig
@@ -497,7 +497,7 @@ const IndexedOutput = struct {
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
const b = step.owner;
const arena = b.allocator;
- const self = @fieldParentPtr(Run, "step", step);
+ const self = @fieldParentPtr(*Run, "step", step);
const has_side_effects = self.hasSideEffects();
var argv_list = ArrayList([]const u8).init(arena);
diff --git a/lib/std/Build/Step/TranslateC.zig b/lib/std/Build/Step/TranslateC.zig
index 7d69ffa8b0..35536158b0 100644
--- a/lib/std/Build/Step/TranslateC.zig
+++ b/lib/std/Build/Step/TranslateC.zig
@@ -118,7 +118,7 @@ pub fn defineCMacroRaw(self: *TranslateC, name_and_value: []const u8) void {
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
const b = step.owner;
- const self = @fieldParentPtr(TranslateC, "step", step);
+ const self = @fieldParentPtr(*TranslateC, "step", step);
var argv_list = std.ArrayList([]const u8).init(b.allocator);
try argv_list.append(b.graph.zig_exe);
diff --git a/lib/std/Build/Step/WriteFile.zig b/lib/std/Build/Step/WriteFile.zig
index aab40a8a5e..c997c86d1f 100644
--- a/lib/std/Build/Step/WriteFile.zig
+++ b/lib/std/Build/Step/WriteFile.zig
@@ -141,7 +141,7 @@ fn maybeUpdateName(wf: *WriteFile) void {
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const b = step.owner;
- const wf = @fieldParentPtr(WriteFile, "step", step);
+ const wf = @fieldParentPtr(*WriteFile, "step", step);
// Writing to source files is kind of an extra capability of this
// WriteFile - arguably it should be a different step. But anyway here