summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-08-10 06:06:56 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-11 07:41:27 -0700
commit5a37a95f0f47817e59d3f5f9e96f98b4e0cde07e (patch)
tree510be1ad64a289aef9261852e2ab476833c76a01 /sv.c
parentba3062ae5fbdf03fcd307336079938ace26aee2b (diff)
downloadperl-5a37a95f0f47817e59d3f5f9e96f98b4e0cde07e.tar.gz
In sv.c:sv_magic don’t allow tying ro COWs
Read-only COWs are read-only and should not be treated as though they were not. This logic is left over from when READONLY+FAKE meant copy-on-write.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index fc22350b53..d6fffa6459 100644
--- a/sv.c
+++ b/sv.c
@@ -5490,10 +5490,7 @@ Perl_sv_magic(pTHX_ SV *const sv, SV *const obj, const int how,
#endif
if (SvREADONLY(sv)) {
if (
- /* its okay to attach magic to shared strings */
- !SvIsCOW(sv)
-
- && IN_PERL_RUNTIME
+ IN_PERL_RUNTIME
&& !PERL_MAGIC_TYPE_READONLY_ACCEPTABLE(how)
)
{