summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-28 22:14:26 +0000
committerDavid Mitchell <davem@iabyn.com>2009-03-29 22:10:27 +0100
commit51bd628b2a7a4f2c9f2b43ce53fbd07b6ca27f41 (patch)
treef05a2eb361023942235ccb6401fdd4395e1d5b5b /mro.c
parentbe06c1998fd32d2ec2f8454b0cf0bd78488e2d32 (diff)
downloadperl-51bd628b2a7a4f2c9f2b43ce53fbd07b6ca27f41.tar.gz
Every remaining (HV *) cast in *.c
p4raw-id: //depot/perl@34629 (cherry-picked from commit 85fbaab29c398adbb5b4445d3ed41e0a96364ce4)
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mro.c b/mro.c
index 56c4d54c2a..304eb2d668 100644
--- a/mro.c
+++ b/mro.c
@@ -90,10 +90,10 @@ Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param)
= (AV*) SvREFCNT_inc(sv_dup((SV*)newmeta->mro_linear_c3, param));
if (newmeta->mro_nextmethod)
newmeta->mro_nextmethod
- = (HV*) SvREFCNT_inc(sv_dup((SV*)newmeta->mro_nextmethod, param));
+ = MUTABLE_HV(SvREFCNT_inc(sv_dup((SV*)newmeta->mro_nextmethod, param)));
if (newmeta->isa)
newmeta->isa
- = (HV*) SvREFCNT_inc(sv_dup((SV*)newmeta->isa, param));
+ = MUTABLE_HV(SvREFCNT_inc(sv_dup((SV*)newmeta->isa, param)));
return newmeta;
}
@@ -199,7 +199,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, I32 level)
It's then retained to be re-used as a fast lookup for ->isa(), by adding
our own name and "UNIVERSAL" to it. */
- stored = (HV*)sv_2mortal((SV*)newHV());
+ stored = MUTABLE_HV(sv_2mortal((SV*)newHV()));
if(av && AvFILLp(av) >= 0) {
@@ -346,7 +346,7 @@ S_mro_get_linear_isa_c3(pTHX_ HV* stash, I32 level)
if(isa && AvFILLp(isa) >= 0) {
SV** seqs_ptr;
I32 seqs_items;
- HV* const tails = (HV*)sv_2mortal((SV*)newHV());
+ HV* const tails = MUTABLE_HV(sv_2mortal((SV*)newHV()));
AV* const seqs = (AV*)sv_2mortal((SV*)newAV());
I32* heads;
@@ -584,7 +584,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
is UNIVERSAL or one of its parents */
svp = hv_fetch(PL_isarev, stashname, stashname_len, 0);
- isarev = svp ? (HV*)*svp : NULL;
+ isarev = svp ? MUTABLE_HV(*svp) : NULL;
if((stashname_len == 9 && strEQ(stashname, "UNIVERSAL"))
|| (isarev && hv_exists(isarev, "UNIVERSAL", 9))) {
@@ -646,7 +646,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
copy&paste [SIN!] the code from newHV() to allow us to upgrade the
new SV from SVt_NULL. */
- mroisarev = (HV*)HeVAL(he);
+ mroisarev = MUTABLE_HV(HeVAL(he));
if(SvTYPE(mroisarev) != SVt_PVHV) {
SvREFCNT_dec(mroisarev);
@@ -709,7 +709,7 @@ Perl_mro_method_changed_in(pTHX_ HV *stash)
const STRLEN stashname_len = HvNAMELEN_get(stash);
SV ** const svp = hv_fetch(PL_isarev, stashname, stashname_len, 0);
- HV * const isarev = svp ? (HV*)*svp : NULL;
+ HV * const isarev = svp ? MUTABLE_HV(*svp) : NULL;
PERL_ARGS_ASSERT_MRO_METHOD_CHANGED_IN;
@@ -900,7 +900,7 @@ XS(XS_mro_get_isarev)
he = hv_fetch_ent(PL_isarev, classname, 0, 0);
- isarev = he ? (HV*)HeVAL(he) : NULL;
+ isarev = he ? MUTABLE_HV(HeVAL(he)) : NULL;
ret_array = newAV();
if(isarev) {
@@ -933,7 +933,7 @@ XS(XS_mro_is_universal)
classname_pv = SvPV(classname,classname_len);
he = hv_fetch_ent(PL_isarev, classname, 0, 0);
- isarev = he ? (HV*)HeVAL(he) : NULL;
+ isarev = he ? MUTABLE_HV(HeVAL(he)) : NULL;
if((classname_len == 9 && strEQ(classname_pv, "UNIVERSAL"))
|| (isarev && hv_exists(isarev, "UNIVERSAL", 9)))