diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-22 16:14:24 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-06-22 23:16:41 -0700 |
commit | c72a4eedff166d5a772fd687231c39fd8ea270c6 (patch) | |
tree | 0779c8d6608b657bbebfc48f273ca91ef5cac83c /sv.c | |
parent | 0bcd71eb9262d2c1c3870898d817b51f08f361a6 (diff) | |
download | perl-c72a4eedff166d5a772fd687231c39fd8ea270c6.tar.gz |
sv.c: Make sv_force_normal always croak on ro SVs
Commit 8990e30710 (perl 5.0 alpha 6) changed several SvREADONLY checks
to apply only to run time. This is convenient when it comes to modify-
ing op trees, whose SVs are, for the most part, marked read-only.
But several pieces of code that relied on this were buggy when dealing
with constants created by ‘use constant’. To make it harder to add
such bugs, I have changed all code that relies on this exception and
am now removing it.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -4861,7 +4861,6 @@ Perl_sv_force_normal_flags(pTHX_ SV *const sv, const U32 flags) #ifdef PERL_ANY_COW if (SvREADONLY(sv)) { - if (IN_PERL_RUNTIME) Perl_croak_no_modify(); } else if (SvIsCOW(sv)) { @@ -4920,7 +4919,6 @@ Perl_sv_force_normal_flags(pTHX_ SV *const sv, const U32 flags) } #else if (SvREADONLY(sv)) { - if (IN_PERL_RUNTIME) Perl_croak_no_modify(); } else |