From 85fbaab29c398adbb5b4445d3ed41e0a96364ce4 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 28 Oct 2008 22:14:26 +0000 Subject: Every remaining (HV *) cast in *.c p4raw-id: //depot/perl@34629 --- scope.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 9c56266e5f..87a0ee3d9a 100644 --- a/scope.c +++ b/scope.c @@ -766,7 +766,7 @@ Perl_leave_scope(pTHX_ I32 base) } break; case SAVEt_HV: /* hash reference */ - hv = (HV*)SSPOPPTR; + hv = MUTABLE_HV(SSPOPPTR); gv = (GV*)SSPOPPTR; if (GvHV(gv)) { SvREFCNT_dec(GvHV(gv)); @@ -809,7 +809,7 @@ Perl_leave_scope(pTHX_ I32 base) break; case SAVEt_HPTR: /* HV* reference */ ptr = SSPOPPTR; - *(HV**)ptr = (HV*)SSPOPPTR; + *(HV**)ptr = MUTABLE_HV(SSPOPPTR); break; case SAVEt_APTR: /* AV* reference */ ptr = SSPOPPTR; @@ -875,7 +875,7 @@ Perl_leave_scope(pTHX_ I32 base) av_clear((AV*)sv); break; case SVt_PVHV: - hv_clear((HV*)sv); + hv_clear(MUTABLE_HV(sv)); break; case SVt_PVCV: Perl_croak(aTHX_ "panic: leave_scope pad code"); @@ -900,7 +900,7 @@ Perl_leave_scope(pTHX_ I32 base) break; case SAVEt_DELETE: ptr = SSPOPPTR; - hv = (HV*)ptr; + hv = MUTABLE_HV(ptr); ptr = SSPOPPTR; (void)hv_delete(hv, (char*)ptr, (I32)SSPOPINT, G_DISCARD); SvREFCNT_dec(hv); @@ -944,7 +944,7 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_HELEM: /* hash element */ value = (SV*)SSPOPPTR; sv = (SV*)SSPOPPTR; - hv = (HV*)SSPOPPTR; + hv = MUTABLE_HV(SSPOPPTR); ptr = hv_fetch_ent(hv, sv, 1, 0); if (ptr) { const SV * const oval = HeVAL((HE*)ptr); @@ -974,7 +974,7 @@ Perl_leave_scope(pTHX_ I32 base) PL_compiling.cop_hints_hash = (struct refcounted_he *) SSPOPPTR; if (PL_hints & HINT_LOCALIZE_HH) { SvREFCNT_dec((SV*)GvHV(PL_hintgv)); - GvHV(PL_hintgv) = (HV*)SSPOPPTR; + GvHV(PL_hintgv) = MUTABLE_HV(SSPOPPTR); assert(GvHV(PL_hintgv)); } else if (!GvHV(PL_hintgv)) { /* Need to add a new one manually, else gv_fetchpv() can -- cgit v1.2.1