diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-10 19:13:20 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-10 19:13:20 +0000 |
commit | f19a12a3a65a1b840e4df1373a12eab6e50a8d5c (patch) | |
tree | b98d3d9b290f7be9238f1852d9b01ed08b487139 /sv.c | |
parent | b538b56a2e21f8e5395db8c0b000b85588d3f585 (diff) | |
download | perl-f19a12a3a65a1b840e4df1373a12eab6e50a8d5c.tar.gz |
Allow lvalue usage of SvRV() and add MUTABLE_SV() check.
Also add new SvRV_const() macro for read-only access.
p4raw-id: //depot/perl@34804
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -10562,8 +10562,8 @@ Perl_rvpv_dup(pTHX_ SV *const dstr, const SV *const sstr, CLONE_PARAMS *const pa if (SvROK(sstr)) { SvRV_set(dstr, SvWEAKREF(sstr) - ? sv_dup(SvRV(sstr), param) - : sv_dup_inc(SvRV(sstr), param)); + ? sv_dup(SvRV_const(sstr), param) + : sv_dup_inc(SvRV_const(sstr), param)); } else if (SvPVX_const(sstr)) { |