fix: more zig-0.15 API changes
This commit is contained in:
parent
d9c93e9783
commit
e9629548ee
1 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ const Proc = struct {
|
||||||
.parent = tp.self_pid().clone(),
|
.parent = tp.self_pid().clone(),
|
||||||
.child = child,
|
.child = child,
|
||||||
.tag = try a.dupeZ(u8, tag),
|
.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);
|
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_stdin) |fd| fd.deinit();
|
||||||
if (self.fd_stdout) |fd| fd.deinit();
|
if (self.fd_stdout) |fd| fd.deinit();
|
||||||
if (self.fd_stderr) |fd| fd.deinit();
|
if (self.fd_stderr) |fd| fd.deinit();
|
||||||
self.stdin_buffer.deinit();
|
self.stdin_buffer.deinit(self.a);
|
||||||
self.parent.deinit();
|
self.parent.deinit();
|
||||||
self.args.deinit();
|
self.args.deinit();
|
||||||
self.a.free(self.tag);
|
self.a.free(self.tag);
|
||||||
|
@ -186,7 +186,7 @@ const Proc = struct {
|
||||||
}
|
}
|
||||||
} else if (try m.match(.{ "stdin", tp.extract(&bytes) })) {
|
} else if (try m.match(.{ "stdin", tp.extract(&bytes) })) {
|
||||||
if (self.fd_stdin) |fd_stdin| {
|
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);
|
fd_stdin.wait_write() catch |e| return self.handle_error(e);
|
||||||
self.write_pending = true;
|
self.write_pending = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue