ZT_PACK_BOOLEAN(3)

πŸ’– zt_pack_boolean(3) πŸ’–

okay so bestie, welcome to the libzt corner of the manual, section 3, and yes this page is filed under LOCAL and it's literally untitled in the old-school header sense, but we're calling it what it is: zt_pack_boolean. pull up a chair. 🫢


✨ NAME ✨

zt_pack_boolean β€” pack a boolean into a variant πŸ’…


🌸 SYNOPSIS 🌸

#include <zt.h>

zt_value
zt_pack_boolean(bool value, const char *source);

πŸ¦‹ DESCRIPTION πŸ¦‹

so zt_pack_boolean takes a boolean and shoves it into a variant-like zt_value, and β€” this is the cute part β€” it also brings along the string that describes the expression that got evaluated to produce that boolean. two for one. iconic. ✨

the source argument is retained by the value, so it doesn't just vibe for a second and leave. and usually it's a constant string literal that the preprocessor cooked up for you. πŸŽ€


🧚 IMPLEMENTATION NOTES 🧚

zt_pack_boolean is only provided as a static inline function. that's the whole note. no cap. πŸ’€


πŸ‘‘ RETURN VALUES πŸ‘‘

the packed value. that's it, that's the return. periodt. πŸ’–


🌈 SEE ALSO 🌈


πŸŽ€ HISTORY πŸŽ€

zt_pack_boolean first appeared in libzt 0.1. baby's first debut, honestly. 🌸


πŸ’œ AUTHORS πŸ’œ

Zygmunt Krynicki <me@zygoon.pl> β€” the main character who wrote this. πŸ”₯


ok that's the whole page bestie, go forth and pack those booleans responsibly 🫢

signing off from libzt 0.3.1, dated January 12, 2020 β€” mwah, stay slay βœ¨πŸ’…πŸŒŸ