summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-27 15:06:56 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-27 15:06:56 +0000
commitb4f7163a2d07b666943392d94612cba73d4d421b (patch)
treed2ad54c808ec2720652b33a84f4860c6065d32d9 /regexec.c
parentd2212429110ea5c7ffe992aa2cb18bde7ce6e83d (diff)
downloadperl-b4f7163a2d07b666943392d94612cba73d4d421b.tar.gz
Further fixing for #15549. Six tests are failing
under Solaris with en_US.UTF-8 but those failures seem unrelated to the BOUND problem, will look at them later. p4raw-id: //depot/perl@15550
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/regexec.c b/regexec.c
index 5dbe166af7..f2d4b3dfa4 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1129,11 +1129,9 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
if (s == PL_bostr)
tmp = '\n';
else {
- U8 *r = reghop3((U8*)s, -1, (U8*)startpos);
+ U8 *r = reghop3((U8*)s, -1, (U8*)PL_bostr);
- tmp = s > (char*)r ?
- utf8n_to_uvchr(r, s - (char*)r, 0, 0) :
- utf8n_to_uvchr(s, UTF8SKIP(s), 0, 0);
+ tmp = utf8n_to_uvchr(r, UTF8SKIP(r), 0, 0);
}
tmp = ((OP(c) == BOUND ?
isALNUM_uni(tmp) : isALNUM_LC_uvchr(UNI_TO_NATIVE(tmp))) != 0);
@@ -1174,11 +1172,9 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
if (s == PL_bostr)
tmp = '\n';
else {
- U8 *r = reghop3((U8*)s, -1, (U8*)startpos);
+ U8 *r = reghop3((U8*)s, -1, (U8*)PL_bostr);
- tmp = s > (char*)r ?
- utf8n_to_uvchr(r, s - (char*)r, 0, 0) :
- utf8n_to_uvchr(s, UTF8SKIP(s), 0, 0);
+ tmp = utf8n_to_uvchr(r, UTF8SKIP(r), 0, 0);
}
tmp = ((OP(c) == NBOUND ?
isALNUM_uni(tmp) : isALNUM_LC_uvchr(UNI_TO_NATIVE(tmp))) != 0);
@@ -2565,11 +2561,9 @@ S_regmatch(pTHX_ regnode *prog)
if (locinput == PL_bostr)
ln = '\n';
else {
- U8 *r = reghop3((U8*)locinput, -1, (U8*)PL_reg_starttry);
+ U8 *r = reghop3((U8*)locinput, -1, (U8*)PL_bostr);
- ln = locinput > (char*)r ?
- utf8n_to_uvchr(r, locinput - (char*)r, 0, 0) :
- utf8n_to_uvchr(locinput, UTF8SKIP(locinput), 0, 0);
+ ln = utf8n_to_uvchr(r, UTF8SKIP(r), 0, 0);
}
if (OP(scan) == BOUND || OP(scan) == NBOUND) {
ln = isALNUM_uni(ln);