diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-07 22:33:39 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-07 22:33:39 +0000 |
commit | d2c6dc5ee586de7e57a1fe8c160cf7c8aaf3f3f8 (patch) | |
tree | a327fc3bbaaeba3b7d394962e7685591b50033be /sv.h | |
parent | da7fcca4b8d6fb4dc88e0305bf9830bf24912ebd (diff) | |
download | perl-d2c6dc5ee586de7e57a1fe8c160cf7c8aaf3f3f8.tar.gz |
Revert SvPVX() to allow lvalue usage, but also add a
MUTABLE_SV() check. Use SvPVX_const() instead of SvPVX()
where only a const SV* is available. Also fix two falsely
consted pointers in Perl_sv_2pv_flags().
p4raw-id: //depot/perl@34770
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1072,7 +1072,7 @@ the scalar's value cannot change unless written to. # if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) /* These get expanded inside other macros that already use a variable _sv */ # define SvPVX(sv) \ - (*({ const SV *const _svpvx = (const SV *)(sv); \ + (*({ SV *const _svpvx = MUTABLE_SV(sv); \ assert(SvTYPE(_svpvx) >= SVt_PV); \ assert(SvTYPE(_svpvx) != SVt_PVAV); \ assert(SvTYPE(_svpvx) != SVt_PVHV); \ |