Skip to content

Commit bbe86ba

Browse files
committed
Use SVf_FAKE from B instead of 0x01000000
0x01000000 was used instead of the macro for it which is SVf_FAKE. Note that we are using '^=' instead of '&= ~'
1 parent 809d6dc commit bbe86ba

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/B/C/OverLoad/B/PV.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package B::PV;
22

33
use strict;
44

5-
use B qw/SVf_IsCOW SVf_ROK SVf_POK SVp_POK SVs_GMG SVt_PVGV SVf_READONLY/;
5+
use B qw/SVf_IsCOW SVf_ROK SVf_POK SVp_POK SVs_GMG SVt_PVGV SVf_READONLY SVf_FAKE/;
66
use B::C::Debug qw/debug/;
77
use B::C::Save qw/savecowpv/;
88
use B::C::Save::Hek qw/save_shared_he get_sHe_HEK/;
@@ -41,7 +41,7 @@ sub do_save {
4141

4242
# static pv, do not destruct. test 13 with pv0 "3".
4343
if ( !$shared_hek and $flags & SVf_READONLY and !$len ) {
44-
$flags &= ~0x01000000;
44+
$flags ^= SVf_FAKE; # turn off SVf_FAKE
4545
debug( pv => "turn off SVf_FAKE %s %s\n", $pv, $fullname );
4646
}
4747

lib/B/C/Section.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package B::C::Section;
22
use strict;
33

44
# use warnings
5+
use B qw/SVf_FAKE/;
56

67
use B::C::Helpers::Symtable ();
78
my %sections;
@@ -24,7 +25,7 @@ sub new {
2425

2526
# if sv add a dummy sv_arenaroot to support global destruction
2627
if ( $section eq 'sv' ) {
27-
$self->add("NULL, 0, SVTYPEMASK|0x01000000, {0}"); # SVf_FAKE
28+
$self->add("NULL, 0, SVTYPEMASK|".SVf_FAKE.", {0}");
2829
$self->debug("PL_sv_arenaroot");
2930
}
3031

0 commit comments

Comments
 (0)