commit ad438cfd40aba682a0bcd88ed607c2cbd378f647 (tree)
parent e932919e680aa6b6ef910e1c4ad969ac1ce0c46d
Author: Andrea Orru <andrea@orru.io>
Date: Sat, 6 Jan 2018 23:13:51 -0500
Merge branch 'master' of github.com:zig-lang/zig
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/std/endian.zig b/std/endian.zig
@@ -16,5 +16,5 @@ pub fn swapIf(endian: builtin.Endian, comptime T: type, x: T) -> T {
pub fn swap(comptime T: type, x: T) -> T {
var buf: [@sizeOf(T)]u8 = undefined;
mem.writeInt(buf[0..], x, false);
- return mem.readInt(buf, T, true);
+ return mem.readInt(buf, T, builtin.Endian.Big);
}
diff --git a/std/rand.zig b/std/rand.zig
@@ -43,7 +43,7 @@ pub const Rand = struct {
} else {
var result: [@sizeOf(T)]u8 = undefined;
r.fillBytes(result[0..]);
- return mem.readInt(result, T, false);
+ return mem.readInt(result, T, builtin.Endian.Little);
}
}