This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SAVEt_CLEARSV: simplify SvREADONLY_off() condition
authorDavid Mitchell <davem@iabyn.com>
Fri, 28 Feb 2014 17:51:47 +0000 (17:51 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 28 Feb 2014 19:38:37 +0000 (19:38 +0000)
commitd263c0173f6ababa6791fd24914c3a92725ce5f0
tree1b61c31ebcd9fd8120d81784c883dc74e3b3c573
parent7500fc82bf4fc88810e403d71737fb3a67bb4ea1
SAVEt_CLEARSV: simplify SvREADONLY_off() condition

SAVEt_CLEARSV should always be called with SvPADMY() true, so don't test
for it, but assert it instead. Then change this:

    if (SvPADMY(sv) && !SvFAKE(sv))
         SvREADONLY_off(sv);

The SvPADMY() isn't needed, but we should test for RO-ness instead, to
avoid an unnecessary SvREADONLY_off().
scope.c