change @bitcast to @ptrcast

See #290
This commit is contained in:
Andrew Kelley
2017-03-31 06:18:20 -04:00
parent 3ca027ca82
commit f8e63c4584
15 changed files with 91 additions and 82 deletions

View File

@@ -239,7 +239,7 @@ pub const AF_MAX = PF_MAX;
/// Get the errno from a syscall return value, or 0 for no error.
pub fn getErrno(r: usize) -> usize {
const signed_r = *@bitcast(&isize, &r);
const signed_r = *@ptrcast(&isize, &r);
if (signed_r > -4096 and signed_r < 0) usize(-signed_r) else 0
}