diff options
| author | Tyge Løvset <[email protected]> | 2022-01-13 14:49:13 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-01-13 14:49:13 +0100 |
| commit | 4a421181052483cef097746fcaaa9027aaf99a7d (patch) | |
| tree | b6a019d7f1cb9cb511e243774251c193c7d23f67 /include/stc/carc.h | |
| parent | ff08e1bb0469750aff5367ae2534278a739bb5d3 (diff) | |
| download | STC-modified-4a421181052483cef097746fcaaa9027aaf99a7d.tar.gz STC-modified-4a421181052483cef097746fcaaa9027aaf99a7d.zip | |
Fixed missing i_eq default setting in template.h, carc and cbox. cstr_substr_utf8 added.
Diffstat (limited to 'include/stc/carc.h')
| -rw-r--r-- | include/stc/carc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h index b33fef2f..ccb23a73 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -194,7 +194,12 @@ _cx_memb(_value_cmp)(const _cx_value* x, const _cx_value* y) { STC_INLINE bool
_cx_memb(_value_eq)(const _cx_value* x, const _cx_value* y) {
- return !_cx_memb(_value_cmp)(x, y);
+ #if c_option(c_no_cmp)
+ return x == y;
+ #else
+ i_valraw rx = i_valto(x), ry = i_valto(x);
+ return i_eq(&rx, &ry);
+ #endif
}
#undef _i_atomic_inc
#undef _i_atomic_dec_and_test
|
