This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[Merge] Read-only COWs
authorFather Chrysostomos <sprout@cpan.org>
Sun, 11 Aug 2013 14:41:45 +0000 (07:41 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 11 Aug 2013 14:41:45 +0000 (07:41 -0700)
Commit 9a0a85075 made shared hash key constants read-only.  This meant
that copy-on-write scalars (shared hash key scalars are one type
of this) could have the read-only flag set, which could not hap-
pen before.

Much code still assumed that read-only && !cow was the proper way to
check for read-onliness (which was correct before perl 5.18, when
READONLY+FAKE meant COW).

This branch fixes up all the instances if SvIsCOW to work correctly
with read-only COWs.

It also allows Internals::SvREADONLY to make a COW read-only without
stopping it from being a COW (affecting constant.pm and Hash::Util).

I also went and fixed up tests under -DPERL_OLD_COPY_ON_WRITE and
-DPERL_NO_COW, in the process of making sure I wasn’t breaking those.


Trivial merge