summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cregex.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-01 16:59:19 +0200
committerTyge Løvset <[email protected]>2022-08-01 16:59:19 +0200
commit23ed40d55f3ff2b30f3b3fe01edfb51e418292b4 (patch)
tree4ea8c8a383165edc0227bc5893b924ec4c90771f /include/stc/cregex.h
parent3038d255c230be1b0605f199a00417658a21a016 (diff)
downloadSTC-modified-23ed40d55f3ff2b30f3b3fe01edfb51e418292b4.tar.gz
STC-modified-23ed40d55f3ff2b30f3b3fe01edfb51e418292b4.zip
fixed up last commit
Diffstat (limited to 'include/stc/cregex.h')
-rw-r--r--include/stc/cregex.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/stc/cregex.h b/include/stc/cregex.h
index 3747eaf7..e828e944 100644
--- a/include/stc/cregex.h
+++ b/include/stc/cregex.h
@@ -71,7 +71,8 @@ typedef struct {
} cregex;
#define c_foreach_match(m, re, input) \
- for (csview m[cre_MAXCAPTURES] = {{0}}; cregex_find(input, &(re), m, cre_m_next) == cre_success;)
+ for (csview m[cre_MAXCAPTURES] = {{0}}, _c_in = csview_from(input); \
+ cregex_find(_c_in.str, &(re), m, cre_m_next) == cre_success; )
//typedef csview cregmatch;