From 2be3bc177fbcdc811db940a59d32a895baa8d4bb Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 26 Sep 2022 10:06:43 +0200 Subject: Another internal. --- include/stc/ccommon.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h index ff4e2342..a1eb812d 100644 --- a/include/stc/ccommon.h +++ b/include/stc/ccommon.h @@ -189,9 +189,9 @@ STC_INLINE char* c_strnstrn(const char *s, const char *needle, ; C##_next(&i.it), i.ref = i.it.ref, ++i.index) #define c_forpair(key, val, C, cnt) /* structured binding */ \ - for (struct {C##_iter _it; const C##_key* key; C##_mapped* val;} _ = {C##_begin(&cnt)} \ - ; _._it.ref && (_.key = &_._it.ref->first, _.val = &_._it.ref->second) \ - ; C##_next(&_._it)) + for (struct {C##_iter it; const C##_key* key; C##_mapped* val;} _ = {.it=C##_begin(&cnt)} \ + ; _.it.ref && (_.key = &_.it.ref->first, _.val = &_.it.ref->second) \ + ; C##_next(&_.it)) // [deprecated]: #define c_forrange(...) c_MACRO_OVERLOAD(c_forrange, __VA_ARGS__) -- cgit v1.2.3