summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-31 08:55:20 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-31 08:55:20 +0000
commit159b6efe04c56d08ae56a63921b5ab3a69ac2ee9 (patch)
treed48340b2de188981511861f9089de49d53b12874 /util.c
parent88e52f1cd82cd6da272e85a8b52d3a27cf1db31e (diff)
downloadperl-159b6efe04c56d08ae56a63921b5ab3a69ac2ee9.tar.gz
Add MUTABLE_GV(), and eliminate (V *) casts in *.c.
Can't easily do gv.h, as GvGP() (at least) needs to split into two macros - one const for reading, one non-const for writing. p4raw-id: //depot/perl@34679
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 3b31ffc9e9..70f81e7717 100644
--- a/util.c
+++ b/util.c
@@ -6005,7 +6005,8 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
if ( svp && ((CvFLAGS(cv) & (CVf_ANON | CVf_CLONED))
|| strEQ(GvNAME(gv), "END")
|| ((GvCV(gv) != cv) && /* Could be imported, and old sub redefined. */
- !( (SvTYPE(*svp) == SVt_PVGV) && (GvCV((GV*)*svp) == cv) )))) {
+ !( (SvTYPE(*svp) == SVt_PVGV)
+ && (GvCV((const GV *)*svp) == cv) )))) {
/* Use GV from the stack as a fallback. */
/* GV is potentially non-unique, or contain different CV. */
SV * const tmp = newRV(MUTABLE_SV(cv));