This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
universal.c: Ignore SvIsCOW in XS_Internals_SvREADONLY
authorFather Chrysostomos <sprout@cpan.org>
Tue, 6 Aug 2013 13:25:59 +0000 (06:25 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 11 Aug 2013 14:41:25 +0000 (07:41 -0700)
commit1620522e445f07dfded3e2bd7051de7349c2ee3e
tree337b664208a1703e2e12d9507085a17e86332019
parent56e04a766185949119c93e963353f9a8712b8ec1
universal.c: Ignore SvIsCOW in XS_Internals_SvREADONLY

SvIsCOW used to check SVf_READONLY|SVf_FAKE.  e3918bb703ca changed
that, but did not change the assumptions that code already made (that
there could be not truly read-only COWs.

Now SvREADONLY actually means read-only, so Internals::SvREADONLY
should not be saying that read-ony COWs are not, nor does it need to
flatten COWs when making them read-only.  Hence, locking hash values
no longer has a speed and memory hit if that hash contains COWs.

Part of the code is left in place for PERL_OLD_COPY_ON_WRITE, to avoid
making read-only COWs under that configuration.  See the previous com-
mit for why.
ext/Devel-Peek/t/Peek.t
universal.c