command: make args type 0-terminated

Since we often need to pass these args back C code, keeping the 0 byte
around saves some allocations.
This commit is contained in:
Isaac Freund
2021-07-15 00:13:16 +02:00
parent 3c951fed74
commit 604cf98047
26 changed files with 67 additions and 77 deletions

View File

@ -29,7 +29,7 @@ const Seat = @import("../Seat.zig");
pub fn declareMode(
allocator: *std.mem.Allocator,
seat: *Seat,
args: []const []const u8,
args: []const [:0]const u8,
out: *?[]const u8,
) Error!void {
if (args.len < 2) return Error.NotEnoughArguments;