diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-04-21 10:39:13 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-04-21 10:39:13 -0400 |
| commit | e3c524c1d482a845bb2d6555bda386739c862226 (patch) | |
| tree | f787e6def3e09691db95852e1a264eb660585af1 /std/os/linux.zig | |
| parent | ecb71d1dd34e98fc9813cffa473f83127e6e3d01 (diff) | |
| download | zig-e3c524c1d482a845bb2d6555bda386739c862226.tar.gz zig-e3c524c1d482a845bb2d6555bda386739c862226.zip | |
rename `@ptrcast` to `@ptrCast` to follow convention
Diffstat (limited to 'std/os/linux.zig')
| -rw-r--r-- | std/os/linux.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/os/linux.zig b/std/os/linux.zig index 1ebade3baf..86a37e1b1c 100644 --- a/std/os/linux.zig +++ b/std/os/linux.zig @@ -251,8 +251,8 @@ pub const DT_LNK = 10; pub const DT_SOCK = 12; pub const DT_WHT = 14; -fn unsigned(s: i32) -> u32 { *@ptrcast(&u32, &s) } -fn signed(s: u32) -> i32 { *@ptrcast(&i32, &s) } +fn unsigned(s: i32) -> u32 { *@ptrCast(&u32, &s) } +fn signed(s: u32) -> i32 { *@ptrCast(&i32, &s) } pub fn WEXITSTATUS(s: i32) -> i32 { signed((unsigned(s) & 0xff00) >> 8) } pub fn WTERMSIG(s: i32) -> i32 { signed(unsigned(s) & 0x7f) } pub fn WSTOPSIG(s: i32) -> i32 { WEXITSTATUS(s) } @@ -262,7 +262,7 @@ pub fn WIFSIGNALED(s: i32) -> bool { (unsigned(s)&0xffff)-%1 < 0xff } /// Get the errno from a syscall return value, or 0 for no error. pub fn getErrno(r: usize) -> usize { - const signed_r = *@ptrcast(&const isize, &r); + const signed_r = *@ptrCast(&const isize, &r); if (signed_r > -4096 and signed_r < 0) usize(-signed_r) else 0 } |
