| ... | ... | @@ -3,7 +3,7 @@ const Archive = @This(); |
| 3 | 3 | const std = @import("std"); |
| 4 | 4 | const assert = std.debug.assert; |
| 5 | 5 | const fs = std.fs; |
| 6 | | const log = std.log.scoped(.macho); |
| 6 | const log = std.log.scoped(.link); |
| 7 | 7 | const macho = std.macho; |
| 8 | 8 | const mem = std.mem; |
| 9 | 9 | |
| ... | ... | @@ -88,6 +88,7 @@ const ar_hdr = extern struct { |
| 88 | 88 | }; |
| 89 | 89 | |
| 90 | 90 | pub fn deinit(self: *Archive, allocator: Allocator) void { |
| 91 | self.file.close(); |
| 91 | 92 | for (self.toc.keys()) |*key| { |
| 92 | 93 | allocator.free(key.*); |
| 93 | 94 | } |
| ... | ... | @@ -217,7 +218,7 @@ pub fn parseObject( |
| 217 | 218 | const contents = try gpa.allocWithOptions(u8, object_size, @alignOf(u64), null); |
| 218 | 219 | const amt = try reader.readAll(contents); |
| 219 | 220 | if (amt != object_size) { |
| 220 | | return error.Io; |
| 221 | return error.InputOutput; |
| 221 | 222 | } |
| 222 | 223 | |
| 223 | 224 | var object = Object{ |