summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2006-04-19 07:35:43 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-04-20 09:35:00 +0000
commitc4fd899278c3d558515085807d99f631cae59e1b (patch)
treeffd209a59707e8c78efebc208b8766b9e9f223d9 /regexec.c
parentf0a09b71ee2ff28fc55a602c80790be291e62898 (diff)
downloadperl-c4fd899278c3d558515085807d99f631cae59e1b.tar.gz
regexec consting & localizing
Message-ID: <20060419173543.GA8268@petdance.com> p4raw-id: //depot/perl@27909
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/regexec.c b/regexec.c
index 2c91f11a6b..e042dfde36 100644
--- a/regexec.c
+++ b/regexec.c
@@ -4139,11 +4139,11 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog)
st->u.plus.count++;
}
} else {
- STRLEN len;
/* count initialised to
* utf8_distance(old, locinput) */
while (locinput <= st->u.plus.e) {
- UV c = utf8n_to_uvchr((U8*)locinput,
+ STRLEN len;
+ const UV c = utf8n_to_uvchr((U8*)locinput,
UTF8_MAXBYTES, &len,
uniflags);
if (c == (UV)st->u.plus.c1 || c == (UV)st->u.plus.c2)
@@ -4381,8 +4381,9 @@ yes_final:
* pop to the state marked by yes_state and continue from there */
/*XXX tmp for CURLYM*/
- regmatch_slab *oslab = PL_regmatch_slab;
- regmatch_state *ost = st, *oys=yes_state;
+ regmatch_slab * const oslab = PL_regmatch_slab;
+ regmatch_state * const ost = st;
+ regmatch_state * const oys = yes_state;
int odepth = depth;
assert(st != yes_state);
@@ -4411,7 +4412,7 @@ yes_final:
/* Restore parens of the caller without popping the
* savestack */
{
- I32 tmp = PL_savestack_ix;
+ const I32 tmp = PL_savestack_ix;
PL_savestack_ix = st->u.eval.lastcp;
regcppop(rex);
PL_savestack_ix = tmp;
@@ -4661,10 +4662,10 @@ final_exit:
/* free all slabs above current one */
if (orig_slab->next) {
- regmatch_slab *osl, *sl = orig_slab->next;
+ regmatch_slab *sl = orig_slab->next;
orig_slab->next = NULL;
while (sl) {
- osl = sl;
+ regmatch_slab * const osl = sl;
sl = sl->next;
Safefree(osl);
}