summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-12-13 08:35:43 +0000
committerNicholas Clark <nick@ccl4.org>2006-12-13 08:35:43 +0000
commitcecf5685359d1599cf3a31ed49f95b583ac5f0da (patch)
treefb6fd87a6a2fee32cfe6034666d2314daacef5dc /util.c
parent670f3923755f0c152f1bbc2d0a205d2d07284748 (diff)
downloadperl-cecf5685359d1599cf3a31ed49f95b583ac5f0da.tar.gz
Eliminate PVBM. Store fast Boyer-Moore tables in PVGV.
Add the placeholder for new type, temporarily named BIND, for binding and aliasing in 6 on 5. p4raw-id: //depot/perl@29544
Diffstat (limited to 'util.c')
-rw-r--r--util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util.c b/util.c
index 3cd98c01bf..8dfe417f5e 100644
--- a/util.c
+++ b/util.c
@@ -490,7 +490,7 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
s = (U8*)SvPV_force_mutable(sv, len);
if (len == 0) /* TAIL might be on a zero-length string. */
return;
- SvUPGRADE(sv, SVt_PVBM);
+ SvUPGRADE(sv, SVt_PVGV);
SvIOK_off(sv);
if (len > 2) {
const unsigned char *sb;
@@ -665,7 +665,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
}
return NULL;
}
- if (SvTYPE(littlestr) != SVt_PVBM || !SvVALID(littlestr)) {
+ if (!SvVALID(littlestr)) {
char * const b = ninstr((char*)big,(char*)bigend,
(char*)little, (char*)little + littlelen);
@@ -760,7 +760,8 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
register const unsigned char *littleend;
I32 found = 0;
- assert(SvTYPE(littlestr) == SVt_PVBM);
+ assert(SvTYPE(littlestr) == SVt_PVGV);
+ assert(SvVALID(littlestr));
if (*old_posp == -1
? (pos = PL_screamfirst[BmRARE(littlestr)]) < 0