diff options
author | Andy Lester <andy@petdance.com> | 2006-05-15 03:54:24 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-05-16 13:14:12 +0000 |
commit | 0ce71af7a9fc04f228d597a47acc6b50ded81784 (patch) | |
tree | ca62805f9a12df7882587b4b361c23e39369f03f /regexec.c | |
parent | 9674d46a132a274aad55231acfd004cbf1e42f04 (diff) | |
download | perl-0ce71af7a9fc04f228d597a47acc6b50ded81784.tar.gz |
Refactoring reghops
Message-ID: <20060515135424.GA31585@petdance.com>
p4raw-id: //depot/perl@28206
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -110,7 +110,6 @@ : (U8*)NULL) \ ) -#define reghopmaybe3_c(pos,off,lim) ((char*)reghopmaybe3((U8*)pos, off, (U8*)lim)) #define HOP3(pos,off,lim) (PL_reg_match_utf8 ? reghop3((U8*)pos, off, (U8*)lim) : (U8*)(pos + off)) #define HOP3c(pos,off,lim) ((char*)HOP3(pos,off,lim)) @@ -572,7 +571,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, t = s - prog->check_offset_max; if (s - strpos > prog->check_offset_max /* signed-corrected t > strpos */ && (!do_utf8 - || ((t = reghopmaybe3_c(s, -(prog->check_offset_max), strpos)) + || ((t = (char*)reghopmaybe3((U8*)s, -(prog->check_offset_max), (U8*)strpos)) && t > strpos))) NOOP; else @@ -692,7 +691,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, t = s - prog->check_offset_max; if (s - strpos > prog->check_offset_max /* signed-corrected t > strpos */ && (!do_utf8 - || ((t = reghopmaybe3_c(s, -prog->check_offset_max, strpos)) + || ((t = (char*)reghopmaybe3((U8*)s, -prog->check_offset_max, (U8*)strpos)) && t > strpos))) { /* Fixed substring is found far enough so that the match cannot start at strpos. */ @@ -5102,7 +5101,7 @@ S_reginclass(pTHX_ const regexp *prog, register const regnode *n, register const } STATIC U8 * -S_reghop3(U8 *s, I32 off, U8* lim) +S_reghop3(U8 *s, I32 off, const U8* lim) { dVAR; if (off >= 0) { @@ -5127,7 +5126,7 @@ S_reghop3(U8 *s, I32 off, U8* lim) } STATIC U8 * -S_reghopmaybe3(U8* s, I32 off, U8* lim) +S_reghopmaybe3(U8* s, I32 off, const U8* lim) { dVAR; if (off >= 0) { |