From bc2981ee8fa3cba0be0d0efb1e2a2072c98ca5a0 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 17 Dec 2020 07:55:59 +0100 Subject: API change: Reverted back to original name used for .val in iterators to .ref --- stc/ccommon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stc/ccommon.h') diff --git a/stc/ccommon.h b/stc/ccommon.h index 3cda038d..0df794df 100644 --- a/stc/ccommon.h +++ b/stc/ccommon.h @@ -89,9 +89,9 @@ #define c_foreach(...) c_MACRO_OVERLOAD(c_foreach, __VA_ARGS__) #define c_foreach_3(it, ctype, cnt) \ - for (ctype##_iter_t it = ctype##_begin(&cnt), it##_end_ = ctype##_end(&cnt); it.val != it##_end_.val; ctype##_next(&it)) + for (ctype##_iter_t it = ctype##_begin(&cnt), it##_end_ = ctype##_end(&cnt); it.ref != it##_end_.ref; ctype##_next(&it)) #define c_foreach_4(it, ctype, start, finish) \ - for (ctype##_iter_t it = start, it##_end_ = finish; it.val != it##_end_.val; ctype##_next(&it)) + for (ctype##_iter_t it = start, it##_end_ = finish; it.ref != it##_end_.ref; ctype##_next(&it)) #define c_forrange(...) c_MACRO_OVERLOAD(c_forrange, __VA_ARGS__) #define c_forrange_1(stop) for (size_t _c_i=0, _c_end_=stop; _c_i < _c_end_; ++_c_i) -- cgit v1.2.3