feat(libxce-alloc-preason-equality): NULL-safe str_eq helper in libxce utils (task 1.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
094577f245
commit
8f25c1c3f3
4 changed files with 56 additions and 2 deletions
|
|
@ -57,6 +57,11 @@
|
|||
|
||||
#define float_equal(a, b) (fabs((a) - (b)) < float_near_zero)
|
||||
|
||||
/* NULL-safe string equality: non-zero iff a and b are both NULL, or both
|
||||
* non-NULL and strcmp(a, b) == 0; zero otherwise (exactly one NULL, or
|
||||
* different contents). Reads only; never modifies either argument. */
|
||||
extern int str_eq(const char* a, const char* b);
|
||||
|
||||
#define STR(x) _STR(x)
|
||||
#define _STR(x) #x
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue