diff options
author | David Mitchell <davem@iabyn.com> | 2016-11-12 14:48:52 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-11-12 16:15:09 +0000 |
commit | a5c7cb08f7954af4accf63bfffaab1bd61f1dd68 (patch) | |
tree | 2202d596d03070380f8708b9966805c814a59168 /util.c | |
parent | b4204fb6f01f49bdf8ebb6d68e0f713a505f069a (diff) | |
download | perl-a5c7cb08f7954af4accf63bfffaab1bd61f1dd68.tar.gz |
eliminate SVpbm_VALID flag
This flag is set on an SV to indicate that it has PERL_MAGIC_bm
(fast Boyer-Moore) magic attached. Instead just directly check whether
it has such magic.
This frees up the 0x40000000 bit for anything except AVs and HVs
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -731,21 +731,8 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags) SvUPGRADE(sv, SVt_PVMG); SvIOK_off(sv); SvNOK_off(sv); - SvVALID_on(sv); - /* "deep magic", the comment used to add. The use of MAGIC itself isn't - really. MAGIC was originally added in 79072805bf63abe5 (perl 5.0 alpha 2) - to call SvVALID_off() if the scalar was assigned to. - - The comment itself (and "deeper magic" below) date back to - 378cc40b38293ffc (perl 2.0). "deep magic" was an annotation on - str->str_pok |= 2; - where the magic (presumably) was that the scalar had a BM table hidden - inside itself. - - As MAGIC is always present on BMs [in Perl 5 :-)], we can use it to store - the table instead of the previous (somewhat hacky) approach of co-opting - the string buffer and storing it after the string. */ + /* add PERL_MAGIC_bm magic holding the FBM lookup table */ assert(!mg_find(sv, PERL_MAGIC_bm)); mg = sv_magicext(sv, NULL, PERL_MAGIC_bm, &PL_vtbl_bm, NULL, 0); |