diff options
| author | Tyge Løvset <[email protected]> | 2022-09-26 10:06:43 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-26 10:06:43 +0200 |
| commit | 2be3bc177fbcdc811db940a59d32a895baa8d4bb (patch) | |
| tree | 8eb217c4acb1d1157926c207f998bb092f363698 | |
| parent | e195879af59cd755c27e79d1bc07f2c2865c2640 (diff) | |
| download | STC-modified-2be3bc177fbcdc811db940a59d32a895baa8d4bb.tar.gz STC-modified-2be3bc177fbcdc811db940a59d32a895baa8d4bb.zip | |
Another internal.
| -rw-r--r-- | include/stc/ccommon.h | 6 |
1 files 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__) |
