authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-12-18 00:25:26-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-12-18 00:25:26-05:00
log05b3b6a45e425e2cb6d46358ec28437c29969e83
tree74f2d43bd2ce2bbd9efa7f81eece8635ff439566
parent83a668b9caac7a9ae7ed2b2e9bf87f34ec2ab1eb

IR: update some std code to newest zig


2 files changed, 3 insertions(+), 3 deletions(-)

std/io.zig+2-2
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1const system = switch(@compileVar("os")) {1const system = switch(@compileVar("os")) {
2 linux => @import("linux.zig"),2 Os.linux => @import("linux.zig"),
3 darwin => @import("darwin.zig"),3 Os.darwin => @import("darwin.zig"),
4 else => @compileError("Unsupported OS"),4 else => @compileError("Unsupported OS"),
5};5};
66
std/math.zig+1-1
...@@ -12,7 +12,7 @@ pub fn max(x: var, y: var) -> @typeOf(x + y) {...@@ -12,7 +12,7 @@ pub fn max(x: var, y: var) -> @typeOf(x + y) {
12 if (x > y) x else y12 if (x > y) x else y
13}13}
1414
15pub error Overflow;15error Overflow;
16pub fn mulOverflow(inline T: type, a: T, b: T) -> %T {16pub fn mulOverflow(inline T: type, a: T, b: T) -> %T {
17 var answer: T = undefined;17 var answer: T = undefined;
18 if (@mulWithOverflow(T, a, b, &answer)) error.Overflow else answer18 if (@mulWithOverflow(T, a, b, &answer)) error.Overflow else answer