summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-09 16:53:28 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 09:40:02 +0200
commitcffe132d3937f3dc01397f5375d368ad39d53ab7 (patch)
tree91a9c930bb9f5e8f96125265c021f70b645cc99d /regexec.c
parent6976cee33e524456a81f646a3fa65f279c6c190d (diff)
downloadperl-cffe132d3937f3dc01397f5375d368ad39d53ab7.tar.gz
Use SvTAIL() instead of BmFLAGS(). The core no longer uses BmFLAGS().
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/regexec.c b/regexec.c
index 6b32aa2ba3..7587a7d542 100644
--- a/regexec.c
+++ b/regexec.c
@@ -6887,16 +6887,16 @@ S_to_utf8_substr(pTHX_ register regexp *prog)
prog->substrs->data[i].utf8_substr = sv;
sv_utf8_upgrade(sv);
if (SvVALID(prog->substrs->data[i].substr)) {
- const U8 flags = BmFLAGS(prog->substrs->data[i].substr);
- if (flags & FBMcf_TAIL) {
+ if (SvTAIL(prog->substrs->data[i].substr)) {
/* Trim the trailing \n that fbm_compile added last
time. */
SvCUR_set(sv, SvCUR(sv) - 1);
/* Whilst this makes the SV technically "invalid" (as its
buffer is no longer followed by "\0") when fbm_compile()
adds the "\n" back, a "\0" is restored. */
- }
- fbm_compile(sv, flags);
+ fbm_compile(sv, FBMcf_TAIL);
+ } else
+ fbm_compile(sv, 0);
}
if (prog->substrs->data[i].substr == prog->check_substr)
prog->check_utf8 = sv;
@@ -6918,15 +6918,14 @@ S_to_byte_substr(pTHX_ register regexp *prog)
SV* sv = newSVsv(prog->substrs->data[i].utf8_substr);
if (sv_utf8_downgrade(sv, TRUE)) {
if (SvVALID(prog->substrs->data[i].utf8_substr)) {
- const U8 flags
- = BmFLAGS(prog->substrs->data[i].utf8_substr);
- if (flags & FBMcf_TAIL) {
+ if (SvTAIL(prog->substrs->data[i].utf8_substr)) {
/* Trim the trailing \n that fbm_compile added last
time. */
SvCUR_set(sv, SvCUR(sv) - 1);
- }
- fbm_compile(sv, flags);
- }
+ fbm_compile(sv, FBMcf_TAIL);
+ } else
+ fbm_compile(sv, 0);
+ }
} else {
SvREFCNT_dec(sv);
sv = &PL_sv_undef;