LOWDOWN_GEMINI_FREE(3)
π LOWDOWN_GEMINI_FREE(3) π
okay bestie, so this is lowdown_gemini_free β a library function from the liblowdown manual, section 3. it's giving "cleanup era". let's get into it π§
β¨ NAME β¨
lowdown_gemini_free β free a Markdown gemini renderer π
π LIBRARY π
library βliblowdownβ β that's the one, no cap π«Ά
πΈ SYNOPSIS πΈ
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
void
lowdown_gemini_free(void *arg);
look at that. three includes, one function, zero drama. iconic. β
π DESCRIPTION π
so basically, this function frees the gemini renderer that you made earlier with lowdown_gemini_new(3). it's the little "okay we're done here, thank u next" moment for your renderer. π
and here's the cute part β if arg is NULL, the function literally does nothing. like, it just vibes. no crash, no drama, no error. it's polite like that. β¨
π₯ EXAMPLES π₯
okay so here's a full little glow-up: this parses b of length bsz and outputs in Gemini format. read it and weep (affectionately) π
struct lowdown_buf *out;
struct lowdown_doc *doc;
struct lowdown_node *n;
void *rndr;
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
err(1, NULL);
if ((doc = lowdown_doc_new(NULL)) == NULL)
err(1, NULL);
if ((n = lowdown_doc_parse(doc, NULL, b, bsz, NULL)) == NULL)
err(1, NULL);
if ((out = lowdown_buf_new(256)) == NULL)
err(1, NULL);
if ((rndr = lowdown_gemini_new(NULL)) == NULL)
err(1, NULL);
if (!lowdown_gemini_rndr(out, rndr, n))
err(1, NULL);
fwrite(out->data, 1, out->size, stdout);
lowdown_gemini_free(rndr);
lowdown_buf_free(out);
lowdown_node_free(n);
lowdown_doc_free(doc);
see that last block? that's the cleanup era. you free the renderer with lowdown_gemini_free(rndr) and then tidy up out, n, and doc right after. main character energy is knowing when to let go. π
π SEE ALSO π
go read those too, bestie, they're the prequel π¦
π STANDARDS π
the gemini βgemtextβ format is documented in Project Gemini over at https://geminiprotocol.net. and the version at the time of writing? 0.24.1. noted. π
and that's the whole page, bestie π this one came from the Debian peeps, dated $Mdocdate$, and yeah β it's LOWDOWN_GEMINI_FREE(3), we been knew. now go free your renderer and slay β¨π
π¦ where this page comes from
- alpine 3.24: lowdown-doc 3.0.1-r0 Β· ISC
- arch rolling: lowdown 3.2.1-1 Β· ISC
- debian trixie: liblowdown-dev 2.0.2-2 Β· ISC
- fedora 43: lowdown-libs 2.0.2-2.fc43 Β· ISC AND BSD-3-Clause AND MIT
- fedora 43: lowdown-libs 2.0.2-2.fc43 Β· ISC AND BSD-3-Clause AND MIT
- fedora 44: lowdown-libs 2.0.2-3.fc44 Β· ISC AND BSD-3-Clause AND MIT
- fedora 44: lowdown-libs 2.0.2-3.fc44 Β· ISC AND BSD-3-Clause AND MIT
- nixpkgs unstable: lowdown 3.0.1
- nixpkgs unstable: lowdown-unsandboxed 3.0.1
- ubuntu questing: liblowdown-dev 2.0.2-2
- ubuntu resolute: liblowdown-dev 2.0.4-2 Β· ISC
- ubuntu stonking: liblowdown-dev 3.0.1-1 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms