logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ZT_CMP_PTR, zt_cmp_int — construct a claim of a relation between two pointers

Authors

       Zygmunt Krynicki <me@zygoon.pl>

libzt 0.3.1                                      March 12, 2020                                    ZT_CMP_PTR(3)

Description

zt_cmp_ptr()  constructs  a claim of a relation between two integers. It should be used through the macro
       ZT_CMP_PTR() which passes source code location and packs arguments.

       The relation must be either ==, or !=

History

       The ZT_CMP_PTR() macro and the zt_cmp_ptr() function first appeared in libzt 0.3

Implementation Notes

ZT_CMP_PTR() evaluates left and right exactly once.

Name

       ZT_CMP_PTR, zt_cmp_int — construct a claim of a relation between two pointers

Return Values

       Both the macro and the function return a claim structure with the  right  attributes  set.  The  returned
       claim is usually passed to zt_check() or to zt_assert().

See Also

ZT_CMP_BOOL(3),    ZT_CMP_CHAR(3),    ZT_CMP_CSTR(3),    ZT_CMP_PTR(3),    ZT_CMP_UINT(3),   ZT_FALSE(3),
       ZT_NOT_NULL(3), ZT_NULL(3), ZT_TRUE(3), zt_check(3),

Synopsis

#include<zt.h>

       #define ZT_CMP_PTR(left, rel, right) \
         zt_cmp_ptr( \
           ZT_CURRENT_LOCATION(), \
           zt_pack_pointer((left), (#left)), \
           zt_pack_string((#rel), (#rel)), \
           zt_pack_pointer((right), (#right)))

       zt_claimzt_cmp_ptr(zt_locationlocation, zt_valueleft, zt_valuerel, zt_valueright);

See Also