aboutsummaryrefslogtreecommitdiff
path: root/lib/std/process.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-06-19 22:36:24 -0700
committerGitHub <noreply@github.com>2023-06-19 22:36:24 -0700
commita72d634b731952ee227d026c27e83c5702dcea4a (patch)
tree8bfc4c9afa75a27ebb1108924589a8e7d5cc89ed /lib/std/process.zig
parentc6e2e1ae4b85fc36acc89c9a5e2673834146d628 (diff)
parenta4d1edac8d65e1aa4b565f6fb11ab78541d97efa (diff)
downloadzig-a72d634b731952ee227d026c27e83c5702dcea4a.tar.gz
zig-a72d634b731952ee227d026c27e83c5702dcea4a.zip
Merge pull request #16046 from BratishkaErik/issue-6128
Renaming `@xtoy` to `@YfromX`
Diffstat (limited to 'lib/std/process.zig')
-rw-r--r--lib/std/process.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/process.zig b/lib/std/process.zig
index f27b7e835b..05066fa436 100644
--- a/lib/std/process.zig
+++ b/lib/std/process.zig
@@ -514,9 +514,9 @@ pub const ArgIteratorWasi = struct {
/// Call to free the internal buffer of the iterator.
pub fn deinit(self: *ArgIteratorWasi) void {
const last_item = self.args[self.args.len - 1];
- const last_byte_addr = @ptrToInt(last_item.ptr) + last_item.len + 1; // null terminated
+ const last_byte_addr = @intFromPtr(last_item.ptr) + last_item.len + 1; // null terminated
const first_item_ptr = self.args[0].ptr;
- const len = last_byte_addr - @ptrToInt(first_item_ptr);
+ const len = last_byte_addr - @intFromPtr(first_item_ptr);
self.allocator.free(first_item_ptr[0..len]);
self.allocator.free(self.args);
}
@@ -1079,9 +1079,9 @@ pub fn getBaseAddress() usize {
return phdr - @sizeOf(std.elf.Ehdr);
},
.macos, .freebsd, .netbsd => {
- return @ptrToInt(&std.c._mh_execute_header);
+ return @intFromPtr(&std.c._mh_execute_header);
},
- .windows => return @ptrToInt(os.windows.kernel32.GetModuleHandleW(null)),
+ .windows => return @intFromPtr(os.windows.kernel32.GetModuleHandleW(null)),
else => @compileError("Unsupported OS"),
}
}