From 83af8ab1249b98bb5cf691b88bfc947d1d688710 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 18 Dec 2023 07:26:01 +0100 Subject: zig 0.11 changes --- src/stackStack.zig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/stackStack.zig') diff --git a/src/stackStack.zig b/src/stackStack.zig index a76d304..d846429 100644 --- a/src/stackStack.zig +++ b/src/stackStack.zig @@ -28,7 +28,7 @@ pub const StackStack = struct { const n = soss.pop(); self.toss = try stack.Stack.init(self.allocator); if (n > 0) { - try self.toss.transfert(soss, @intCast(u64, n)); + try self.toss.transfert(soss, @intCast(n)); } else if (n < 0) { var i: usize = 0; while (i < -n) : (i += 1) { @@ -85,9 +85,11 @@ pub const StackStack = struct { const n = self.toss.pop(); const v = soss.popVector(); if (n > 0) { - try soss.transfert(self.toss, @intCast(u64, n)); + const nn: usize = @intCast(n); + try soss.transfert(self.toss, nn); } else { - soss.discard(@intCast(u64, -n)); + const nn: usize = @intCast(-n); + soss.discard(nn); } self.toss.deinit(); self.toss = soss; -- cgit v1.2.3