diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-16 15:01:48 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-16 15:01:48 +0000 |
commit | bce8f4120e2273696708e81ef6c1d919b324fb00 (patch) | |
tree | 795ef6d576327f450ec3b57b2d81faeaa9e5c430 /sv.c | |
parent | d26d6e7231f676560b7b29eac7f56fef99b265cb (diff) | |
download | perl-bce8f4120e2273696708e81ef6c1d919b324fb00.tar.gz |
Assuming that everything with 0x40000000 is SVpad_TYPED is bogus.
p4raw-id: //depot/perl@24480
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1937,6 +1937,10 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt) there's no way that it can be safely upgraded, because perl.c expects to Safefree(SvANY(PL_mess_sv)) */ assert(sv != PL_mess_sv); + /* This flag bit is used to mean other things in other scalar types. + Given that it only has meaning inside the pad, it shouldn't be set + on anything that can get upgraded. */ + assert((SvFLAGS(sv) & SVpad_TYPED) == 0); pv = SvPVX(sv); cur = SvCUR(sv); len = SvLEN(sv); @@ -5975,7 +5979,7 @@ Perl_sv_clear(pTHX_ register SV *sv) if (SvTYPE(sv) >= SVt_PVMG) { if (SvMAGIC(sv)) mg_free(sv); - if (SvFLAGS(sv) & SVpad_TYPED) + if (SvTYPE(sv) == SVt_PVMG && SvFLAGS(sv) & SVpad_TYPED) SvREFCNT_dec(SvSTASH(sv)); } stash = NULL; |