summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-10 19:55:49 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-10 19:55:49 +0000
commitb5a2f8d883d38be33345ce4afe970bc14be51e58 (patch)
treed8cb8ce8ca06ba7e9a5bad979109bf31031f76f2 /regcomp.c
parent35ab56323549cd3c972fa3918e0e9a2875081466 (diff)
downloadperl-b5a2f8d883d38be33345ce4afe970bc14be51e58.tar.gz
All S_dumpuntil()'s regnode pointer arguments can be const.
p4raw-id: //depot/perl@27762
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regcomp.c b/regcomp.c
index fe32ce2283..ff17478db5 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6228,13 +6228,13 @@ S_put_byte(pTHX_ SV *sv, int c)
}
-STATIC regnode *
-S_dumpuntil(pTHX_ const regexp *r, regnode *start, regnode *node, regnode *last,
- SV* sv, I32 l)
+STATIC const regnode *
+S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
+ const regnode *last, SV* sv, I32 l)
{
dVAR;
register U8 op = EXACT; /* Arbitrary non-END op. */
- register regnode *next;
+ register const regnode *next;
while (op != END && (!last || node < last)) {
/* While that wasn't END last time... */
@@ -6243,7 +6243,7 @@ S_dumpuntil(pTHX_ const regexp *r, regnode *start, regnode *node, regnode *last,
op = OP(node);
if (op == CLOSE)
l--;
- next = regnext(node);
+ next = regnext((regnode *)node);
/* Where, what. */
if (OP(node) == OPTIMIZED)
goto after_print;
@@ -6257,9 +6257,9 @@ S_dumpuntil(pTHX_ const regexp *r, regnode *start, regnode *node, regnode *last,
(void)PerlIO_putc(Perl_debug_log, '\n');
after_print:
if (PL_regkind[(U8)op] == BRANCHJ) {
- register regnode *nnode = (OP(next) == LONGJMP
- ? regnext(next)
- : next);
+ register const regnode *nnode = (OP(next) == LONGJMP
+ ? regnext((regnode *)next)
+ : next);
if (last && nnode > last)
nnode = last;
node = dumpuntil(r, start, NEXTOPER(NEXTOPER(node)), nnode, sv, l + 1);