summaryrefslogtreecommitdiff
path: root/mro_core.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-07-20 14:11:13 +0000
committerNicholas Clark <nick@ccl4.org>2021-07-26 07:06:00 +0000
commitbffed14d6aeedc70a2f799ef7c8fe1f5d608eb52 (patch)
treeef4f6c8e2a284bf3ea34d9c674462f9af55c8fae /mro_core.c
parent0cdaae3e56c7eb2fab73f258cf564fe0d6d1b083 (diff)
downloadperl-bffed14d6aeedc70a2f799ef7c8fe1f5d608eb52.tar.gz
Where the key is an SV, replace some hv_* calls with hv_*_ent equivalents.
This avoids the SvUTF8(tmpstr) ? -(I32)SvCUR(tmpstr) : (I32)SvCUR(tmpstr) code dance.
Diffstat (limited to 'mro_core.c')
-rw-r--r--mro_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mro_core.c b/mro_core.c
index 25642d826f..bb513df8cd 100644
--- a/mro_core.c
+++ b/mro_core.c
@@ -958,9 +958,8 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes,
if(PL_stashcache) {
DEBUG_o(Perl_deb(aTHX_ "mro_gather_and_rename clearing PL_stashcache for '%" SVf "'\n",
SVfARG(*svp)));
- (void)hv_delete(PL_stashcache, name, name_utf8 ? -(I32)len : (I32)len, G_DISCARD);
+ (void)hv_delete_ent(PL_stashcache, *svp, G_DISCARD, 0);
}
- ++svp;
hv_ename_delete(oldstash, name, len, name_utf8);
if (!fetched_isarev) {
@@ -976,11 +975,12 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes,
if(meta->isa && HvARRAY(meta->isa))
mro_clean_isarev(meta->isa, name, len, 0, 0,
name_utf8 ? HVhek_UTF8 : 0);
- isarev = (HV *)hv_delete(PL_isarev, name,
- name_utf8 ? -(I32)len : (I32)len, 0);
+ isarev = (HV *)hv_delete_ent(PL_isarev, *svp, 0, 0);
fetched_isarev=TRUE;
}
}
+
+ ++svp;
}
}
}