diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 05:18:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 05:55:49 -0300 |
| commit | de0447471febe1253b42a32fe9a1d6cdccc9d5b9 (patch) | |
| tree | cacff70a9b976f621832e7b9d41bf24ee3e5c5ed /src/kinds/pardes_addon.h | |
| parent | 3f4df1363d3051bf8c4665fdf4898d59ab365b27 (diff) | |
| download | pardes-de0447471febe1253b42a32fe9a1d6cdccc9d5b9.tar.gz pardes-de0447471febe1253b42a32fe9a1d6cdccc9d5b9.zip | |
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 <prefix>/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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/kinds/pardes_addon.h')
| -rw-r--r-- | src/kinds/pardes_addon.h | 4 |
1 files changed, 3 insertions, 1 deletions
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; |
