aboutsummaryrefslogtreecommitdiff
path: root/lib/std/start.zig
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2023-06-15 13:14:16 +0600
committerAndrew Kelley <andrew@ziglang.org>2023-06-19 12:34:42 -0700
commit50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc (patch)
tree9e2b95d8e111e905e00511962dfd32c8e5bb3245 /lib/std/start.zig
parenta6c8ee5231230947c928bbe1c6a39eb6e1bb9c5b (diff)
downloadzig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.tar.gz
zig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.zip
all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'lib/std/start.zig')
-rw-r--r--lib/std/start.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig
index f5d2688efb..9c83bd881c 100644
--- a/lib/std/start.zig
+++ b/lib/std/start.zig
@@ -248,7 +248,7 @@ fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) callconv
return root.main();
},
uefi.Status => {
- return @enumToInt(root.main());
+ return @intFromEnum(root.main());
},
else => @compileError("expected return type of main to be 'void', 'noreturn', 'usize', or 'std.os.uefi.Status'"),
}
@@ -419,7 +419,7 @@ fn posixCallMainAndExit() callconv(.C) noreturn {
else => continue,
}
}
- break :init @intToPtr([*]elf.Phdr, at_phdr)[0..at_phnum];
+ break :init @ptrFromInt([*]elf.Phdr, at_phdr)[0..at_phnum];
};
// Apply the initial relocations as early as possible in the startup
@@ -500,7 +500,7 @@ fn main(c_argc: c_int, c_argv: [*][*:0]c_char, c_envp: [*:null]?[*:0]c_char) cal
if (builtin.os.tag == .linux) {
const at_phdr = std.c.getauxval(elf.AT_PHDR);
const at_phnum = std.c.getauxval(elf.AT_PHNUM);
- const phdrs = (@intToPtr([*]elf.Phdr, at_phdr))[0..at_phnum];
+ const phdrs = (@ptrFromInt([*]elf.Phdr, at_phdr))[0..at_phnum];
expandStackSize(phdrs);
}