summaryrefslogtreecommitdiff
path: root/src/esp32p4
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-22 09:50:43 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:24 -0300
commita8b457a306a4442975210bcac3f04b56513c61c3 (patch)
tree6e2026ecb15da2fb919a0202f5d8b38e3b36a595 /src/esp32p4
parenta8a1499bdffffc5b6919e24ec957e92fabaf003b (diff)
parent7e9d2c4169245072265b483ffaa6aa05f23f08d3 (diff)
downloadpardes-a8b457a306a4442975210bcac3f04b56513c61c3.tar.gz
pardes-a8b457a306a4442975210bcac3f04b56513c61c3.zip
Merge: Def/Refs, the diff viewer, Helix n/N, Callstack, Zig 0.17, Window mode and the terminal cwd fix onto 0.24
The docs keep both sides: 0.24's Ctrl-i fallbacks and typed ls with this line's Window mode, raw Esc and Helix n/N wording. The CHANGELOG's unreleased entries go above 0.24, Def/Refs and the context rows among them. cheatsheet-a4.pdf rendered again; .scratch/ ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/esp32p4')
-rw-r--r--src/esp32p4/app.zig6
-rw-r--r--src/esp32p4/input_rescue.zig2
-rw-r--r--src/esp32p4/selftest.zig2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/esp32p4/app.zig b/src/esp32p4/app.zig
index 4ee131ec..800e7597 100644
--- a/src/esp32p4/app.zig
+++ b/src/esp32p4/app.zig
@@ -235,17 +235,17 @@ var gpa_heap: heapmod.Heap = undefined;
fn cAlloc(_: ?*anyopaque, len: usize, log2_align: u8) callconv(.c) ?[*]u8 {
const a = gpa_heap.allocator();
- return a.vtable.alloc(a.ptr, len, @enumFromInt(log2_align), @returnAddress());
+ return a.vtable.alloc(a.ptr, len, @fromBackingInt(@intCast(log2_align)), @returnAddress());
}
fn cResize(_: ?*anyopaque, ptr: [*]u8, len: usize, log2_align: u8, new_len: usize) callconv(.c) bool {
const a = gpa_heap.allocator();
- return a.vtable.resize(a.ptr, ptr[0..len], @enumFromInt(log2_align), new_len, @returnAddress());
+ return a.vtable.resize(a.ptr, ptr[0..len], @fromBackingInt(@intCast(log2_align)), new_len, @returnAddress());
}
fn cFree(_: ?*anyopaque, ptr: [*]u8, len: usize, log2_align: u8) callconv(.c) void {
const a = gpa_heap.allocator();
- a.vtable.free(a.ptr, ptr[0..len], @enumFromInt(log2_align), @returnAddress());
+ a.vtable.free(a.ptr, ptr[0..len], @fromBackingInt(@intCast(log2_align)), @returnAddress());
}
const editor_allocator: Allocator = .{
diff --git a/src/esp32p4/input_rescue.zig b/src/esp32p4/input_rescue.zig
index ba6974d2..d7556d46 100644
--- a/src/esp32p4/input_rescue.zig
+++ b/src/esp32p4/input_rescue.zig
@@ -245,7 +245,7 @@ test "a long transmit does not lose the input that arrives during it" {
defer port.sent.deinit(std.testing.allocator);
var ring: Ring = .{};
- const frame = "\x1b[1;1H" ++ "x" ** 400;
+ const frame = "\x1b[1;1H" ++ &@as([400]u8, @splat('x'));
try std.testing.expectEqual(@as(u32, 0), pump(&port, &ring, frame, 1_000_000));
// Every output byte went out, in order.
diff --git a/src/esp32p4/selftest.zig b/src/esp32p4/selftest.zig
index 97b43059..19b71e90 100644
--- a/src/esp32p4/selftest.zig
+++ b/src/esp32p4/selftest.zig
@@ -270,7 +270,7 @@ export fn zig_main() noreturn {
const typed = "the quick brown fox jumps over the lazy dog, and then some more besides";
var port: FakePort = .{ .tx_cap = 2, .incoming = typed };
var ring: input_rescue.Ring = .{};
- const frame = "\x1b[1;1H" ++ "x" ** 300;
+ const frame = "\x1b[1;1H" ++ &@as([300]u8, @splat('x'));
const abandoned = input_rescue.pump(&port, &ring, frame, 1_000_000);
check("the frame went out whole", abandoned == 0 and port.sent == frame.len);