summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 14:35:15 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commitbc3d18d27f9fc1155db7fac3946c4d38774f9e65 (patch)
tree9178ce95952797f8a78b16c2b805e53368efb35a /src/9p_io.zig
parent1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2 (diff)
downloadpardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.tar.gz
pardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.zip
Build with Zig 0.17
ghostty, libvaxis and uucode move to ghostty's 0.17 pins, cloud9 to its 0.17 main, SDL to castholm's release-3.4.x (3.4.18), zstbi and tree-sitter to forks with 0.17 build files (see build.zig.zon). A bare zig build copies the binaries into ~/.local/bin (-Dhome-install=false leaves it out): 0.17 keeps the prefix from build scripts. A terminal's edited copy goes when the program clears the screen. tinywin.snap is gone; perf baselines are re-recorded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index 18c51ece..27d79b93 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -1553,7 +1553,7 @@ test "a socket path too long for sun_path is no listener, and leaves the editor'
} else {
_ = unsetenv("XDG_RUNTIME_DIR");
};
- const long = "n" ** 120;
+ const long = &@as([120]u8, @splat('n'));
try testing.expect(listen(testing.io, testing.allocator, p, long, "", null, null) == null);
try testing.expect(pardes.turn.answer_held == null);
try testing.expect(pardes.turn.wake_parked == null);
@@ -1567,7 +1567,7 @@ test "a listening editor posts itself into the 9P registry and unposts on stop"
_ = try std.fmt.bufPrintSentinel(&directory, "/tmp/pardes-post-XXXXXX", .{}, 0);
if (mkdtemp(&directory) == null) return error.TempDirectoryFailed;
const dir = std.mem.span(@as([*:0]const u8, &directory));
- const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeZ(u8, std.mem.span(v)) else null;
+ const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeSentinel(u8, std.mem.span(v), 0) else null;
defer {
if (old_runtime) |v| {
_ = setenv("XDG_RUNTIME_DIR", v, 1);
@@ -1628,7 +1628,7 @@ test "Unix TCP and QUIC share one listener through reads writes reconnects and r
if (mkdtemp(&directory) == null) return error.TempDirectoryFailed;
// What the listener posted and left inside goes with it.
defer std.Io.Dir.cwd().deleteTree(testing.io, std.mem.sliceTo(&directory, 0)) catch |err| std.debug.print("deleteTree: {s}\n", .{@errorName(err)});
- const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeZ(u8, std.mem.span(v)) else null;
+ const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeSentinel(u8, std.mem.span(v), 0) else null;
defer {
if (old_runtime) |v| {
_ = setenv("XDG_RUNTIME_DIR", v, 1);
@@ -1749,7 +1749,7 @@ test "a change waits while the editor is out mid-step, a read does not, and the
if (mkdtemp(&directory) == null) return error.TempDirectoryFailed;
// What the listener posted and left inside goes with it.
defer std.Io.Dir.cwd().deleteTree(testing.io, std.mem.sliceTo(&directory, 0)) catch |err| std.debug.print("deleteTree: {s}\n", .{@errorName(err)});
- const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeZ(u8, std.mem.span(v)) else null;
+ const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeSentinel(u8, std.mem.span(v), 0) else null;
defer {
if (old_runtime) |v| {
_ = setenv("XDG_RUNTIME_DIR", v, 1);
@@ -1824,7 +1824,7 @@ test "a held read is answered when the log has news, and a flushed one spends no
if (mkdtemp(&directory) == null) return error.TempDirectoryFailed;
// What the listener posted and left inside goes with it.
defer std.Io.Dir.cwd().deleteTree(testing.io, std.mem.sliceTo(&directory, 0)) catch |err| std.debug.print("deleteTree: {s}\n", .{@errorName(err)});
- const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeZ(u8, std.mem.span(v)) else null;
+ const old_runtime = if (libc.getenv("XDG_RUNTIME_DIR")) |v| try gpa.dupeSentinel(u8, std.mem.span(v), 0) else null;
defer {
if (old_runtime) |v| {
_ = setenv("XDG_RUNTIME_DIR", v, 1);
@@ -2051,7 +2051,7 @@ test "a pane's PARDES_MOUNT is the session's directory under 9ns --mntgen, and u
const names = [_][*:0]const u8{ "NINE_MNTGEN", "NINE_MOUNT", "PARDES_MOUNT" };
var saved: [names.len]?[:0]u8 = @splat(null);
for (names, &saved) |name, *value| {
- if (libc.getenv(name)) |old| value.* = try testing.allocator.dupeZ(u8, std.mem.span(old));
+ if (libc.getenv(name)) |old| value.* = try testing.allocator.dupeSentinel(u8, std.mem.span(old), 0);
}
defer for (names, saved) |name, value| {
if (value) |old| {
@@ -2073,7 +2073,7 @@ test "9P shell environment states being inside pardes apart from how to reach it
const names = [_][*:0]const u8{ "XDG_RUNTIME_DIR", "HOME", "PARDES_PID", "PARDES_9P", "PARDES_PANE" };
var saved: [names.len]?[:0]u8 = @splat(null);
for (names, &saved) |name, *value| {
- if (libc.getenv(name)) |old| value.* = try testing.allocator.dupeZ(u8, std.mem.span(old));
+ if (libc.getenv(name)) |old| value.* = try testing.allocator.dupeSentinel(u8, std.mem.span(old), 0);
}
defer for (names, saved) |name, value| {
if (value) |old| {