diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-30 18:48:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-30 18:48:31 -0800 |
| commit | 7355a201336c8e3892427e5932fe5cdd46cf96df (patch) | |
| tree | 4ccec922634586847d02f2324d0db75f25200188 /src/link.zig | |
| parent | dd62a6d2e8de522187fd096354e7156cca1821c5 (diff) | |
| parent | 066eaa5e9cbfde172449f6d95bb884c7d86ac10c (diff) | |
| download | zig-7355a201336c8e3892427e5932fe5cdd46cf96df.tar.gz zig-7355a201336c8e3892427e5932fe5cdd46cf96df.zip | |
Merge pull request #10055 from leecannon/allocator_refactor
Allocgate
Diffstat (limited to 'src/link.zig')
| -rw-r--r-- | src/link.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/link.zig b/src/link.zig index 77464737b0..79a1c63462 100644 --- a/src/link.zig +++ b/src/link.zig @@ -165,7 +165,7 @@ pub const File = struct { tag: Tag, options: Options, file: ?fs.File, - allocator: *Allocator, + allocator: Allocator, /// When linking with LLD, this linker code will output an object file only at /// this location, and then this path can be placed on the LLD linker line. intermediary_basename: ?[]const u8 = null, @@ -221,7 +221,7 @@ pub const File = struct { /// incremental linking fails, falls back to truncating the file and /// rewriting it. A malicious file is detected as incremental link failure /// and does not cause Illegal Behavior. This operation is not atomic. - pub fn openPath(allocator: *Allocator, options: Options) !*File { + pub fn openPath(allocator: Allocator, options: Options) !*File { if (options.object_format == .macho) { return &(try MachO.openPath(allocator, options)).base; } @@ -628,7 +628,7 @@ pub const File = struct { var arena_allocator = std.heap.ArenaAllocator.init(base.allocator); defer arena_allocator.deinit(); - const arena = &arena_allocator.allocator; + const arena = arena_allocator.allocator(); const directory = base.options.emit.?.directory; // Just an alias to make it shorter to type. |
