This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c: Allow COWs through sv_magic unscathed
authorFather Chrysostomos <sprout@cpan.org>
Sun, 23 Jun 2013 21:38:32 +0000 (14:38 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 23 Jun 2013 21:38:32 +0000 (14:38 -0700)
commiteaf7e88fef6975b1ed0126a8c819540f761cf002
tree4629ac0f2d99a934432cc540a6965fee63256ea5
parent4021c788a0e0964dc98740e5f74648d8d60b6f3c
sv.c: Allow COWs through sv_magic unscathed

There is no need to run COWs through sv_force_normal when
attaching magic to them via sv_magic.  (I don’t know about
PERL_OLD_COPY_ON_WRITE, but I left it in, just to be sure.)

Before this, only sv_magicext could attach magic to SVs that were
already COWs.  That meant pos($cow)=7 would leave it as a COW, but
copy-on-write would never happen with tainted strings.
sv.c