diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-10-28 22:14:26 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-10-28 22:14:26 +0000 |
commit | 85fbaab29c398adbb5b4445d3ed41e0a96364ce4 (patch) | |
tree | 15a994b3781bdecc7e89f92575577ad52894cc2a /mg.c | |
parent | b8082b6e76ddae55d59bd06493f5cb60a320b165 (diff) | |
download | perl-85fbaab29c398adbb5b4445d3ed41e0a96364ce4.tar.gz |
Every remaining (HV *) cast in *.c
p4raw-id: //depot/perl@34629
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1197,11 +1197,11 @@ Perl_magic_set_all_env(pTHX_ SV *sv, MAGIC *mg) if (PL_localizing) { HE* entry; my_clearenv(); - hv_iterinit((HV*)sv); - while ((entry = hv_iternext((HV*)sv))) { + hv_iterinit(MUTABLE_HV(sv)); + while ((entry = hv_iternext(MUTABLE_HV(sv)))) { I32 keylen; my_setenv(hv_iterkey(entry, &keylen), - SvPV_nolen_const(hv_iterval((HV*)sv, entry))); + SvPV_nolen_const(hv_iterval(MUTABLE_HV(sv), entry))); } } #endif @@ -1633,7 +1633,7 @@ Perl_magic_setamagic(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg) { - HV * const hv = (HV*)LvTARG(sv); + HV * const hv = MUTABLE_HV(LvTARG(sv)); I32 i = 0; PERL_ARGS_ASSERT_MAGIC_GETNKEYS; @@ -1659,7 +1659,7 @@ Perl_magic_setnkeys(pTHX_ SV *sv, MAGIC *mg) PERL_ARGS_ASSERT_MAGIC_SETNKEYS; PERL_UNUSED_ARG(mg); if (LvTARG(sv)) { - hv_ksplit((HV*)LvTARG(sv), SvIV(sv)); + hv_ksplit(MUTABLE_HV(LvTARG(sv)), SvIV(sv)); } return 0; } @@ -2159,7 +2159,7 @@ Perl_magic_getdefelem(pTHX_ SV *sv, MAGIC *mg) if (LvTARGLEN(sv)) { if (mg->mg_obj) { SV * const ahv = LvTARG(sv); - HE * const he = hv_fetch_ent((HV*)ahv, mg->mg_obj, FALSE, 0); + HE * const he = hv_fetch_ent(MUTABLE_HV(ahv), mg->mg_obj, FALSE, 0); if (he) targ = HeVAL(he); } @@ -2211,7 +2211,7 @@ Perl_vivify_defelem(pTHX_ SV *sv) return; if (mg->mg_obj) { SV * const ahv = LvTARG(sv); - HE * const he = hv_fetch_ent((HV*)ahv, mg->mg_obj, TRUE, 0); + HE * const he = hv_fetch_ent(MUTABLE_HV(ahv), mg->mg_obj, TRUE, 0); if (he) value = HeVAL(he); if (!value || value == &PL_sv_undef) |