summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.ohio-state.edu>1997-02-04 06:02:10 -0500
committerChip Salzenberg <chip@atlantic.net>1997-02-11 07:29:00 +1200
commit47109bfb6ec14235ab32462f69f32cdab1822cee (patch)
tree9979887b385d897bcc7c8e24eaeaed27cf94ea8a /regexec.c
parent360e57411903f2d16ad89bcdf4a462fc97239653 (diff)
downloadperl-47109bfb6ec14235ab32462f69f32cdab1822cee.tar.gz
Regexp optimizations
Subject: Re: Regexp optimizations p5p-msgid: <199702051450.JAA13439@rio.atlantic.net> private-msgid: <199702041102.GAA24805@monk.mps.ohio-state.edu>
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index c55eb97ff5..12908b245f 100644
--- a/regexec.c
+++ b/regexec.c
@@ -290,7 +290,7 @@ I32 safebase; /* no need to remember string in subbase */
s++;
}
}
- else if (SvPOK(prog->regstart) == 3) {
+ else if (SvTYPE(prog->regstart) == SVt_PVBM) {
/* We know what string it must start with. */
while ((s = fbm_instr((unsigned char*)s,
(unsigned char*)strend, prog->regstart)) != NULL)
@@ -300,7 +300,7 @@ I32 safebase; /* no need to remember string in subbase */
s++;
}
}
- else {
+ else { /* Optimized fbm_instr: */
c = SvPVX(prog->regstart);
while ((s = ninstr(s, strend, c, c + SvCUR(prog->regstart))) != NULL)
{