From de0447471febe1253b42a32fe9a1d6cdccc9d5b9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 05:18:01 -0300 Subject: kinds #8, image.so: addons/image/image.c (144 lines) is the image kind against ABI 2 over stb_image as zstbi vendors it (every format it decoded, HDR out, at most 1280 pixels a side, 64 Mpixels refused before decoding), its record the file's bytes, its decode a job, one placement fitted, its prefix img; stb's memory is the pane's arena at open and the job's on a worker, so pa_out's alloc may be called as often as a job needs (an arena a job, freed after its job_done, the last allocation the answer: what the header found wanting); the build makes it with -Wall -Wextra -Werror and installs it to /lib/pardes/addons/image.so (a bare build to ~/.local/lib/pardes/addons too); the compiled-in image kind is still there, so the start scan lists the library refused as a second image Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/kinds/pardes_addon.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/kinds') diff --git a/src/kinds/pardes_addon.h b/src/kinds/pardes_addon.h index c6aa448b..6241c6c0 100644 --- a/src/kinds/pardes_addon.h +++ b/src/kinds/pardes_addon.h @@ -167,7 +167,9 @@ typedef struct pa_api { uint64_t (*seed)(void); } pa_api; -/* A job's answer buffer: `alloc` it once, write it, return its length. */ +/* What a job allocates from, on its worker (pa_api is not there): as often + * as it needs, all of it freed after its job_done. The last it allocates + * is the answer, which the job writes and returns the length of. */ typedef struct pa_out { void *(*alloc)(struct pa_out *out, size_t n); void *ctx; -- cgit v1.3