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 /regexp.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 'regexp.h')
-rw-r--r-- | regexp.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -371,11 +371,13 @@ and check for NULL. /* For source compatibility. We used to store these explicitly. */ #define RX_PRECOMP(prog) (RX_WRAPPED(prog) + ((struct regexp *)SvANY(prog))->pre_prefix) +#define RX_PRECOMP_const(prog) (RX_WRAPPED_const(prog) + ((struct regexp *)SvANY(prog))->pre_prefix) /* FIXME? Are we hardcoding too much here and constraining plugin extension writers? Specifically, the value 1 assumes that the wrapped version always has exactly one character at the end, a ')'. Will that always be true? */ #define RX_PRELEN(prog) (RX_WRAPLEN(prog) - ((struct regexp *)SvANY(prog))->pre_prefix - 1) #define RX_WRAPPED(prog) SvPVX(prog) +#define RX_WRAPPED_const(prog) SvPVX_const(prog) #define RX_WRAPLEN(prog) SvCUR(prog) #define RX_CHECK_SUBSTR(prog) (((struct regexp *)SvANY(prog))->check_substr) #define RX_REFCNT(prog) SvREFCNT(prog) |