summaryrefslogtreecommitdiff
path: root/scope.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 /scope.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 'scope.c')
-rw-r--r--scope.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/scope.c b/scope.c
index 6e74978aeb..4b900efe49 100644
--- a/scope.c
+++ b/scope.c
@@ -710,7 +710,7 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_SV: /* scalar reference */
value = MUTABLE_SV(SSPOPPTR);
- gv = (GV*)SSPOPPTR;
+ gv = MUTABLE_GV(SSPOPPTR);
ptr = &GvSV(gv);
av = MUTABLE_AV(gv); /* what to refcnt_dec */
restore_sv:
@@ -754,7 +754,7 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_AV: /* array reference */
av = MUTABLE_AV(SSPOPPTR);
- gv = (GV*)SSPOPPTR;
+ gv = MUTABLE_GV(SSPOPPTR);
if (GvAV(gv)) {
SvREFCNT_dec(GvAV(gv));
}
@@ -767,7 +767,7 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_HV: /* hash reference */
hv = MUTABLE_HV(SSPOPPTR);
- gv = (GV*)SSPOPPTR;
+ gv = MUTABLE_GV(SSPOPPTR);
if (GvHV(gv)) {
SvREFCNT_dec(GvHV(gv));
}
@@ -817,7 +817,7 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_GP: /* scalar reference */
ptr = SSPOPPTR;
- gv = (GV*)SSPOPPTR;
+ gv = MUTABLE_GV(SSPOPPTR);
gp_free(gv);
GvGP(gv) = (GP*)ptr;
/* putting a method back into circulation ("local")*/
@@ -1048,7 +1048,7 @@ Perl_leave_scope(pTHX_ I32 base)
/* These are only saved in mathoms.c */
case SAVEt_NSTAB:
- gv = (GV*)SSPOPPTR;
+ gv = MUTABLE_GV(SSPOPPTR);
(void)sv_clear(MUTABLE_SV(gv));
break;
case SAVEt_LONG: /* long reference */