diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 20:57:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 21:34:14 -0300 |
| commit | 9589f6878ffd2501b4ce5a034ead58119d38749c (patch) | |
| tree | bb5dafdd90f552144b29ad3468fac30b38992f2b /src/Output.zig | |
| parent | 76b493ef40a02931eb86805aa30040a594b72ec8 (diff) | |
| download | pardes-9589f6878ffd2501b4ce5a034ead58119d38749c.tar.gz pardes-9589f6878ffd2501b4ce5a034ead58119d38749c.zip | |
kinds #42, what a Zig kind over a C library needs of the module and the core: addon.zig's `init` at load (a library's own setup, MuPDF's allocator) and a body the kind holds (`body(s) []const u8`, any length: a PDF page's text is past body_max), the Debug budget counting only the kind's own time (the file's hash before `open` and pa_api.heap's allocations are the core's: a region's first took 23 ms of a PDF's open, which was the breach), `current` the loop's thread's (a job's heap call is in no call), an Output's arg set from itself (a kind's rows found after its search refill its +Search with its own arg: the @memcpy aliased), and the docs test reading the words of Zig kinds (`.{ .name = "PdfFit"`) beside C's
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Output.zig')
| -rw-r--r-- | src/Output.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Output.zig b/src/Output.zig index c719f909..f1ce7ab9 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -244,7 +244,8 @@ test "plain output does not opt into location decoration" { pub fn setArg(o: *State, text: []const u8) error{ArgumentTooLong}!void { if (text.len > max_arg) return error.ArgumentTooLong; o.arg_len = @intCast(text.len); - @memcpy(o.arg_buf[0..o.arg_len], text); + // (its own arg again, a kind's rows found after its search) + std.mem.copyForwards(u8, o.arg_buf[0..o.arg_len], text); } pub const Traits = builtins.OutputTraits; |
