From 71db8df5480f4d849480267574cd5491066e3868 Mon Sep 17 00:00:00 2001 From: kristopher tate Date: Thu, 21 Jun 2018 00:40:21 +0900 Subject: std: update stdlib to match updated allocator create signature; ref #733 --- std/atomic/queue.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'std/atomic/queue.zig') diff --git a/std/atomic/queue.zig b/std/atomic/queue.zig index 3dc64dbea2..5b810f95ac 100644 --- a/std/atomic/queue.zig +++ b/std/atomic/queue.zig @@ -114,8 +114,10 @@ fn startPuts(ctx: *Context) u8 { while (put_count != 0) : (put_count -= 1) { std.os.time.sleep(0, 1); // let the os scheduler be our fuzz const x = @bitCast(i32, r.random.scalar(u32)); - const node = ctx.allocator.create(Queue(i32).Node) catch unreachable; - node.data = x; + const node = ctx.allocator.create(Queue(i32).Node{ + .next = null, + .data = x + }) catch unreachable; ctx.queue.put(node); _ = @atomicRmw(isize, &ctx.put_sum, builtin.AtomicRmwOp.Add, x, AtomicOrder.SeqCst); } -- cgit v1.2.3