ZT_FALSE(3)
π ZT_FALSE(3) π
okay so bestie, welcome to ZT_FALSE(3) from the LOCAL manual section β she's a lil macro and a lil function and she has ONE job and she does it flawlessly. no cap. π
β¨ NAME β¨
ZT_FALSE, zt_false β construct a claim that a value is false π«Ά
πΈ SYNOPSIS πΈ
#include <zt.h>
#define ZT_FALSE(value) \
zt_false( \
ZT_CURRENT_LOCATION(), \
zt_pack_boolean((value), #value)) \
zt_claim
zt_false(zt_location location, zt_value value);
π DESCRIPTION π
zt_false() builds you a claim that some value you handed over is false. that's it. that's the whole vibe.
okay but listen β you're supposed to use her through the macro ZT_FALSE(), not by calling the function directly, because the macro is the one that scoops up your source code location and packs the argument for you. she does the errands. let her. β¨
so where does zt_false() actually shine? when you wanna check custom properties by running your own arbitrary verification logic. main character move, honestly. the tradeoff though (and we gotta be real about this) is that when it fails, the error message can't precisely explain what the problem was. it just says "not false, bestie" and shrugs. π so if you need a good error message, that's a different tool's job.
π§ IMPLEMENTATION NOTES π§
ZT_FALSE() evaluates value only once. one and done. no double-dipping, no surprise side effects running twice. iconic behaviour, we love to see it. π
π RETURN VALUES π
both the macro and the function hand you back a claim structure with all the right attributes set. and then you usually pass that claim straight into zt_check() or zt_assert(). it's giving assembly line. π¦
π SEE ALSO π
ZT_CMP_BOOL(3)ZT_CMP_RUNE(3)ZT_CMP_CSTR(3)ZT_CMP_INT(3)ZT_CMP_PTR(3)ZT_CMP_UINT(3)ZT_FALSE(3)ZT_NOT_NULL(3)ZT_NULL(3)zt_check(3)
(the original list ends with a trailing comma after zt_check(3), and honestly? she's keeping it. periodt.)
π HISTORY π
the ZT_FALSE() macro and the zt_false() function first appeared in libzt 0.1. baby's first era. πΌβ¨
π AUTHORS π
Zygmunt Krynicki <me@zygoon.pl> β shoutout to the legend, thank you for your service π«‘πΈ
and that's the whole page, bestie!! this lil doc came to you from libzt 0.3.1, dated January 12, 2020. go forth and assert that things are false π π
π¦ where this page comes from
- debian bookworm: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- debian trixie: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu jammy: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu noble: libzt-doc 0.3.1-4build1 Β· LGPL-3.0-only
- ubuntu questing: libzt-doc 0.3.1-4build1
- ubuntu resolute: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- ubuntu stonking: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms