diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2021-10-11 12:44:46 +0200 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2021-12-24 05:28:14 +0000 |
| commit | c1d985ac2985b985aa8848490a0fab4fe8403dba (patch) | |
| tree | 3c0673ff51200bab3b51cdb6a641e86524107b34 /riverctl/main.zig | |
| parent | 1edaa5ad211342298cfe0bf46169a619ad555f56 (diff) | |
| download | river-c1d985ac2985b985aa8848490a0fab4fe8403dba.tar.gz river-c1d985ac2985b985aa8848490a0fab4fe8403dba.tar.xz | |
build: update to zig version 0.9.0
Diffstat (limited to 'riverctl/main.zig')
| -rw-r--r-- | riverctl/main.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/riverctl/main.zig b/riverctl/main.zig index 63ec331..7c429dc 100644 --- a/riverctl/main.zig +++ b/riverctl/main.zig @@ -20,6 +20,7 @@ const mem = std.mem; const io = std.io; const os = std.os; const assert = std.debug.assert; +const builtin = @import("builtin"); const wayland = @import("wayland"); const wl = wayland.client.wl; @@ -47,8 +48,7 @@ pub const Globals = struct { pub fn main() !void { _main() catch |err| { - if (std.builtin.mode == .Debug) - return err; + if (builtin.mode == .Debug) return err; switch (err) { error.RiverControlNotAdvertised => fatal( @@ -96,7 +96,7 @@ fn _main() !void { for (result.args) |arg| control.addArgument(arg); const callback = try control.runCommand(seat); - callback.setListener(?*c_void, callbackListener, null); + callback.setListener(?*anyopaque, callbackListener, null); // Loop until our callback is called and we exit. while (true) _ = try display.dispatch(); @@ -116,7 +116,7 @@ fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: * } } -fn callbackListener(callback: *zriver.CommandCallbackV1, event: zriver.CommandCallbackV1.Event, _: ?*c_void) void { +fn callbackListener(_: *zriver.CommandCallbackV1, event: zriver.CommandCallbackV1.Event, _: ?*anyopaque) void { switch (event) { .success => |success| { if (mem.len(success.output) > 0) { |
