ASON_COPY(3)
π ason_copy β the manual page, but make it cute
okay bestie, we're doing the ason_copy page from the ASON manual (section 3, the library-call girlies π
). it's short, it's sweet, and it's lowkey important. let's go π¦
β¨ NAME β¨
ason_copy β Copy an ASON value. π
like. the name literally tells you what it does. copy. an ason. iconic behaviour fr.
πΈ SYNOPSIS πΈ
#include <ason/ason.h>
ason_t *ason_copy(ason_t *a);
that's it. that's the whole vibe. one include, one function, one pointer. no cap. β¨
π DESCRIPTION π
so ason_copy copys an ason_t value (yes the original says "copys", we do not fix the original's spelling, we simply respect it π«Ά). the result is a new ason_t, and that new one has to have ason_destroy (3) called on it separately. like, its own separate cleanup. its own separate journey. you cannot skip it and you cannot merge it with anything else. periodt. π
β οΈ okay this next bit is the real tea, so listen up bestie: libason may actually use refcounting internally to distinguish objects. but here's the thing β your program should always behave as though ason_copy returns a new pointer. always. no exceptions. π
and because of that: you should never use pointer comparison to inspect pointers to ason_t. like, don't be out here doing == on your ason_t pointers and expecting it to mean something. it doesn't. it will not. the internals are doing their own little refcount dance behind the curtain and you are NOT invited backstage. π
π₯ RETURN VALUE π₯
ason_copy always returns a valid pointer to ason_t. π
not sometimes. not maybe. always. she never misses. no NULL check anxiety required, queen π
π¦ SEE ALSO π¦
ason(3) β the main character of this whole library, obviously πason_destroy(3) β the one you MUST call on the copy you just made, do not forget her π₯Ί
π§ AUTHOR π§
Casey Dahlin <casey.dahlin@gmail.com> β the legend who wrote this, we stan π
and that's the whole page bestie!! this one came from the Linux manual, the JANUARY 2014 edition, filed under ASON COPY(3) β so yeah, she's an elder but she's still slaying, go call ason_destroy on your copies and hydrate π§π
β¨
π¦ where this page comes from
- fedora 43: libason-devel 0.1.2-27.fc43 Β· GPL-3.0-or-later
- fedora 43: libason-devel 0.1.2-27.fc43 Β· GPL-3.0-or-later
- fedora 44: libason-devel 0.1.2-28.fc44 Β· GPL-3.0-or-later
- fedora 44: libason-devel 0.1.2-28.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms