aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO/CodeSignature.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 18:00:55 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit1dcfc8787e86ed94d216976e621a49fc488e8214 (patch)
treed5225fa3a0abee6f6ff8f2793fe1ccea951d20a8 /src/link/MachO/CodeSignature.zig
parent4be8be1d2bd6959efae7df95e3f5713adf953a42 (diff)
downloadzig-1dcfc8787e86ed94d216976e621a49fc488e8214.tar.gz
zig-1dcfc8787e86ed94d216976e621a49fc488e8214.zip
update all readFileAlloc() to accept Io instance
Diffstat (limited to 'src/link/MachO/CodeSignature.zig')
-rw-r--r--src/link/MachO/CodeSignature.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/link/MachO/CodeSignature.zig b/src/link/MachO/CodeSignature.zig
index ec516d4af0..0955c823b8 100644
--- a/src/link/MachO/CodeSignature.zig
+++ b/src/link/MachO/CodeSignature.zig
@@ -17,6 +17,12 @@ const MachO = @import("../MachO.zig");
const hash_size = Sha256.digest_length;
+page_size: u16,
+code_directory: CodeDirectory,
+requirements: ?Requirements = null,
+entitlements: ?Entitlements = null,
+signature: ?Signature = null,
+
const Blob = union(enum) {
code_directory: *CodeDirectory,
requirements: *Requirements,
@@ -220,12 +226,6 @@ const Signature = struct {
}
};
-page_size: u16,
-code_directory: CodeDirectory,
-requirements: ?Requirements = null,
-entitlements: ?Entitlements = null,
-signature: ?Signature = null,
-
pub fn init(page_size: u16) CodeSignature {
return .{
.page_size = page_size,
@@ -246,8 +246,8 @@ pub fn deinit(self: *CodeSignature, allocator: Allocator) void {
}
}
-pub fn addEntitlements(self: *CodeSignature, allocator: Allocator, path: []const u8) !void {
- const inner = try Io.Dir.cwd().readFileAlloc(path, allocator, .limited(std.math.maxInt(u32)));
+pub fn addEntitlements(self: *CodeSignature, allocator: Allocator, io: Io, path: []const u8) !void {
+ const inner = try Io.Dir.cwd().readFileAlloc(io, path, allocator, .limited(std.math.maxInt(u32)));
self.entitlements = .{ .inner = inner };
}