From e9629548ee015d80b5016503a44ada3667d6db98 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 24 Aug 2025 16:08:32 +0200 Subject: [PATCH] fix: more zig-0.15 API changes --- src/subprocess.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/subprocess.zig b/src/subprocess.zig index 7a2ee03..ce3e2fb 100644 --- a/src/subprocess.zig +++ b/src/subprocess.zig @@ -111,7 +111,7 @@ const Proc = struct { .parent = tp.self_pid().clone(), .child = child, .tag = try a.dupeZ(u8, tag), - .stdin_buffer = std.ArrayList(u8).init(a), + .stdin_buffer = .empty, }; return tp.spawn_link(a, self, Proc.start, tag); } @@ -120,7 +120,7 @@ const Proc = struct { if (self.fd_stdin) |fd| fd.deinit(); if (self.fd_stdout) |fd| fd.deinit(); if (self.fd_stderr) |fd| fd.deinit(); - self.stdin_buffer.deinit(); + self.stdin_buffer.deinit(self.a); self.parent.deinit(); self.args.deinit(); self.a.free(self.tag); @@ -186,7 +186,7 @@ const Proc = struct { } } else if (try m.match(.{ "stdin", tp.extract(&bytes) })) { if (self.fd_stdin) |fd_stdin| { - self.stdin_buffer.appendSlice(bytes) catch |e| return self.handle_error(e); + self.stdin_buffer.appendSlice(self.a, bytes) catch |e| return self.handle_error(e); fd_stdin.wait_write() catch |e| return self.handle_error(e); self.write_pending = true; }