summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-29 22:45:15 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-29 22:45:15 +0000
commit502c6561fcd473b7da3277363169d75f16ac2f8b (patch)
tree5b840aca24d5b44969c910e6c97f9edf7e221e48 /scope.c
parent70d97eb0b44379e6179430e19c4bb4222d3544e9 (diff)
downloadperl-502c6561fcd473b7da3277363169d75f16ac2f8b.tar.gz
Eliminate (AV *) casts in *.c.
p4raw-id: //depot/perl@34650
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/scope.c b/scope.c
index 87a0ee3d9a..d808ac68a6 100644
--- a/scope.c
+++ b/scope.c
@@ -712,7 +712,7 @@ Perl_leave_scope(pTHX_ I32 base)
value = (SV*)SSPOPPTR;
gv = (GV*)SSPOPPTR;
ptr = &GvSV(gv);
- av = (AV*)gv; /* what to refcnt_dec */
+ av = MUTABLE_AV(gv); /* what to refcnt_dec */
restore_sv:
sv = *(SV**)ptr;
*(SV**)ptr = value;
@@ -753,7 +753,7 @@ Perl_leave_scope(pTHX_ I32 base)
SvREFCNT_dec(value);
break;
case SAVEt_AV: /* array reference */
- av = (AV*)SSPOPPTR;
+ av = MUTABLE_AV(SSPOPPTR);
gv = (GV*)SSPOPPTR;
if (GvAV(gv)) {
SvREFCNT_dec(GvAV(gv));
@@ -813,7 +813,7 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_APTR: /* AV* reference */
ptr = SSPOPPTR;
- *(AV**)ptr = (AV*)SSPOPPTR;
+ *(AV**)ptr = MUTABLE_AV(SSPOPPTR);
break;
case SAVEt_GP: /* scalar reference */
ptr = SSPOPPTR;
@@ -872,7 +872,7 @@ Perl_leave_scope(pTHX_ I32 base)
case SVt_NULL:
break;
case SVt_PVAV:
- av_clear((AV*)sv);
+ av_clear(MUTABLE_AV(sv));
break;
case SVt_PVHV:
hv_clear(MUTABLE_HV(sv));
@@ -926,7 +926,7 @@ Perl_leave_scope(pTHX_ I32 base)
case SAVEt_AELEM: /* array element */
value = (SV*)SSPOPPTR;
i = SSPOPINT;
- av = (AV*)SSPOPPTR;
+ av = MUTABLE_AV(SSPOPPTR);
ptr = av_fetch(av,i,1);
if (!AvREAL(av) && AvREIFY(av)) /* undo reify guard */
SvREFCNT_dec(value);
@@ -953,7 +953,7 @@ Perl_leave_scope(pTHX_ I32 base)
if (SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
SvREFCNT_inc_void(*(SV**)ptr);
SvREFCNT_dec(sv);
- av = (AV*)hv; /* what to refcnt_dec */
+ av = MUTABLE_AV(hv); /* what to refcnt_dec */
goto restore_sv;
}
}
@@ -1022,8 +1022,8 @@ Perl_leave_scope(pTHX_ I32 base)
case SAVEt_SAVESWITCHSTACK:
{
dSP;
- AV* const t = (AV*)SSPOPPTR;
- AV* const f = (AV*)SSPOPPTR;
+ AV *const t = MUTABLE_AV(SSPOPPTR);
+ AV *const f = MUTABLE_AV(SSPOPPTR);
SWITCHSTACK(t,f);
PL_curstackinfo->si_stack = f;
}