diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-29 13:17:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-29 13:17:10 (GMT) |
commit | b0b75a50838fb17c643dad2d633c7240d207db96 (patch) | |
tree | ab995338e4b7059fabdc9b295e5948e263bd0651 /generic/regexec.c | |
parent | 432fbdc37562b215a1955ebc8c5af4aadd24315a (diff) | |
download | tcl-b0b75a50838fb17c643dad2d633c7240d207db96.zip tcl-b0b75a50838fb17c643dad2d633c7240d207db96.tar.gz tcl-b0b75a50838fb17c643dad2d633c7240d207db96.tar.bz2 |
More progress
Diffstat (limited to 'generic/regexec.c')
-rw-r--r-- | generic/regexec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/regexec.c b/generic/regexec.c index fdbdef0..b9091ab 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -545,8 +545,8 @@ zapallsubs( size_t i; for (i = n-1; i > 0; i--) { - p[i].rm_so = -1; - p[i].rm_eo = -1; + p[i].rm_so = TCL_INDEX_NONE; + p[i].rm_eo = TCL_INDEX_NONE; } } @@ -560,11 +560,11 @@ zaptreesubs( struct subre *const t) { if (t->op == '(') { - int n = t->subno; + size_t n = t->subno; assert(n > 0); - if ((size_t) n < v->nmatch) { - v->pmatch[n].rm_so = -1; - v->pmatch[n].rm_eo = -1; + if (n < v->nmatch) { + v->pmatch[n].rm_so = TCL_INDEX_NONE; + v->pmatch[n].rm_eo = TCL_INDEX_NONE; } } |