diff options
author | Artur Bergman <sky@nanisky.com> | 2001-10-23 19:39:24 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2001-10-23 19:39:24 +0000 |
commit | 1edbfb88dca645450f44e4bcbb3df8372f66c904 (patch) | |
tree | e1bac51132188fe10864233812a7a6f60291fdd0 /sv.c | |
parent | f7916ddb4507eb1374c2aa49d31cb87cd7b69add (diff) | |
download | perl-1edbfb88dca645450f44e4bcbb3df8372f66c904.tar.gz |
Change #12607 introduced a bug, seems like some MAGICAL SVs
don't call themselves READONLY but still die with modification
attempt. We only call bless for ext and umagic.
p4raw-id: //depot/perl@12610
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -7205,7 +7205,11 @@ Perl_sv_bless(pTHX_ SV *sv, HV *stash) else SvAMAGIC_off(sv); - SvSETMAGIC(tmpRef); + if(SvSMAGICAL(tmpRef)) + if(mg_find(tmpRef, PERL_MAGIC_ext) || mg_find(tmpRef, PERL_MAGIC_uvar)) + mg_set(tmpRef); + + return sv; } |