aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-03-19 12:46:38 +0100
committerJacob Young <jacobly0@users.noreply.github.com>2024-03-30 20:50:48 -0400
commiteb723a407073592db858cf14bece8643bec2a771 (patch)
tree504be71818a397d2b8ce07aa26718b5c7a5b7ef5 /src/Module.zig
parent17673dcd6e3ffeb25fc9dc1cfc72334ab4e71b37 (diff)
downloadzig-eb723a407073592db858cf14bece8643bec2a771.tar.gz
zig-eb723a407073592db858cf14bece8643bec2a771.zip
Update uses of `@fieldParentPtr` to use RLS
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig
index ac2d11d575..0399a2f85b 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -299,7 +299,7 @@ const ValueArena = struct {
/// and must live until the matching call to release().
pub fn acquire(self: *ValueArena, child_allocator: Allocator, out_arena_allocator: *std.heap.ArenaAllocator) Allocator {
if (self.state_acquired) |state_acquired| {
- return @fieldParentPtr(std.heap.ArenaAllocator, "state", state_acquired).allocator();
+ return @as(*std.heap.ArenaAllocator, @fieldParentPtr("state", state_acquired)).allocator();
}
out_arena_allocator.* = self.state.promote(child_allocator);
@@ -309,7 +309,7 @@ const ValueArena = struct {
/// Releases the allocator acquired by `acquire. `arena_allocator` must match the one passed to `acquire`.
pub fn release(self: *ValueArena, arena_allocator: *std.heap.ArenaAllocator) void {
- if (@fieldParentPtr(std.heap.ArenaAllocator, "state", self.state_acquired.?) == arena_allocator) {
+ if (@as(*std.heap.ArenaAllocator, @fieldParentPtr("state", self.state_acquired.?)) == arena_allocator) {
self.state = self.state_acquired.?.*;
self.state_acquired = null;
}