diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-02-02 14:37:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-02-02 14:37:31 +0000 |
commit | 610460f93dd5a2665c479dc22acb80489faf9ce7 (patch) | |
tree | 6b025ad9cf71d3c12db7eb09431cb49273bdbd34 /util.c | |
parent | eff3c707b45221807117761fc9b63fdb1798af5e (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |