summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-02-02 14:37:31 +0000
committerNicholas Clark <nick@ccl4.org>2007-02-02 14:37:31 +0000
commit610460f93dd5a2665c479dc22acb80489faf9ce7 (patch)
tree6b025ad9cf71d3c12db7eb09431cb49273bdbd34 /util.c
parenteff3c707b45221807117761fc9b63fdb1798af5e (diff)
downloadperl-610460f93dd5a2665c479dc22acb80489faf9ce7.tar.gz
Change 29502 wasn't perfect - you need to remove any extra trailing
"\n" added by fbm_compile(), before recompiling with the same flags. In turn, to do that, it's best to store the flags even for short "PVBM"s. p4raw-id: //depot/perl@30092
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 1e85ecaca7..a8b83f721d 100644
--- a/util.c
+++ b/util.c
@@ -504,7 +504,6 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
= (unsigned char*)(SvPVX_mutable(sv) + len + PERL_FBM_TABLE_OFFSET);
s = table - 1 - PERL_FBM_TABLE_OFFSET; /* last char */
memset((void*)table, mlen, 256);
- BmFLAGS(sv) = (U8)flags;
i = 0;
sb = s - mlen + 1; /* first char (maybe) */
while (s >= sb) {
@@ -524,6 +523,7 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
frequency = PL_freq[s[i]];
}
}
+ BmFLAGS(sv) = (U8)flags;
BmRARE(sv) = s[rarest];
BmPREVIOUS(sv) = rarest;
BmUSEFUL(sv) = 100; /* Initial value */