summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-09-07 08:22:09 +0200
committerTyge Lovset <[email protected]>2022-09-07 08:22:09 +0200
commitab073505ad044e95cf83cc89effe992707a02c4d (patch)
treea172a389a06d2efb62682a1c1920f3e32eb1f7bf /include
parentfad1c0f3d116586a1b4fc3e95ba1acc5cf0aba08 (diff)
downloadSTC-modified-ab073505ad044e95cf83cc89effe992707a02c4d.tar.gz
STC-modified-ab073505ad044e95cf83cc89effe992707a02c4d.zip
Internal.
Diffstat (limited to 'include')
-rw-r--r--include/stc/csview.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h
index b60f6e38..5d30174f 100644
--- a/include/stc/csview.h
+++ b/include/stc/csview.h
@@ -104,9 +104,9 @@ STC_API csview csview_slice_ex(csview sv, intptr_t p1, intptr_t p2);
STC_API csview csview_token(csview sv, csview sep, size_t* start);
#define c_foreach_token_sv(it, input, sep) \
- for (struct { csview token, _sep, _inp; size_t start; } \
- it = {.token=input, ._sep=sep, ._inp=it.token, .start=0} \
- ; it.start <= it._inp.size && (it.token = csview_token(it._inp, it._sep, &it.start)).str ; )
+ for (struct { csview _inp, _sep, token; size_t pos; } \
+ it = {._inp=input, ._sep=sep, .token=it._inp, .pos=0} \
+ ; it.pos <= it._inp.size && (it.token = csview_token(it._inp, it._sep, &it.pos)).str ; )
#define c_foreach_token(it, input, sep) \
c_foreach_token_sv(it, csview_from(input), csview_from(sep))