summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-07 22:18:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-07 22:18:54 +0000
commit76384e4ae84ed55d949d353b24577f0a3f3a082a (patch)
tree1b7a18207dcd5ecb3324f18a62d16d2a826e2126
parent4fabb5965cb13ba2085b455bf751c89110c43659 (diff)
downloadperl-76384e4ae84ed55d949d353b24577f0a3f3a082a.tar.gz
fix for 'make utest' failures (from Ilya Zakharevich)
p4raw-id: //depot/perl@4770
-rw-r--r--regexec.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/regexec.c b/regexec.c
index 0bd9da8b20..acdbd890ae 100644
--- a/regexec.c
+++ b/regexec.c
@@ -691,6 +691,10 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
char *startpos = sv ? strend - SvCUR(sv) : s;
t = s;
+ if (prog->reganch & ROPT_UTF8) {
+ PL_regdata = prog->data; /* Used by REGINCLASS UTF logic */
+ PL_bostr = startpos;
+ }
s = find_byclass(prog, prog->regstclass, s, endpos, startpos, 1);
if (!s) {
#ifdef DEBUGGING
@@ -872,9 +876,9 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
/* FALL THROUGH */
case BOUNDUTF8:
tmp = (I32)(s != startpos) ? utf8_to_uv(reghop((U8*)s, -1), 0) : '\n';
- tmp = ((OP(c) == BOUND ? isALNUM_uni(tmp) : isALNUM_LC_uni(tmp)) != 0);
+ tmp = ((OP(c) == BOUNDUTF8 ? isALNUM_uni(tmp) : isALNUM_LC_uni(tmp)) != 0);
while (s < strend) {
- if (tmp == !(OP(c) == BOUND ?
+ if (tmp == !(OP(c) == BOUNDUTF8 ?
swash_fetch(PL_utf8_alnum, (U8*)s) :
isALNUM_LC_utf8((U8*)s)))
{
@@ -907,12 +911,10 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
PL_reg_flags |= RF_tainted;
/* FALL THROUGH */
case NBOUNDUTF8:
- if (prog->minlen)
- strend = reghop_c(strend, -1);
tmp = (I32)(s != startpos) ? utf8_to_uv(reghop((U8*)s, -1), 0) : '\n';
- tmp = ((OP(c) == NBOUND ? isALNUM_uni(tmp) : isALNUM_LC_uni(tmp)) != 0);
+ tmp = ((OP(c) == NBOUNDUTF8 ? isALNUM_uni(tmp) : isALNUM_LC_uni(tmp)) != 0);
while (s < strend) {
- if (tmp == !(OP(c) == NBOUND ?
+ if (tmp == !(OP(c) == NBOUNDUTF8 ?
swash_fetch(PL_utf8_alnum, (U8*)s) :
isALNUM_LC_utf8((U8*)s)))
tmp = !tmp;