summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-03-01 18:20:53 -0800
committerFather Chrysostomos <sprout@cpan.org>2015-03-01 18:20:53 -0800
commit813d2eb17164751c312a69e7c7c56dc71aad1ff1 (patch)
treed7bd23aef272dc7641255d88c7d52a137ef75055 /sv.c
parentce7c414ee71d82955c799dca38981337cdf77b42 (diff)
downloadperl-813d2eb17164751c312a69e7c7c56dc71aad1ff1.tar.gz
[perl #123849] sv.c: Fix sv_clear -Do output
We try to print ‘sv_clear clearing PL_stashcache for '%"SVf"'’, but the sv here is a hash, and we can’t do SvPV on it. We need the hash’s name. This has been this way since 103f5a36127.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sv.c b/sv.c
index 45f70665fd..4b797fef02 100644
--- a/sv.c
+++ b/sv.c
@@ -6612,17 +6612,19 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
PL_last_swash_hv = NULL;
}
if (HvTOTALKEYS((HV*)sv) > 0) {
- const char *name;
+ const HEK *hek;
/* this statement should match the one at the beginning of
* hv_undef_flags() */
if ( PL_phase != PERL_PHASE_DESTRUCT
- && (name = HvNAME((HV*)sv)))
+ && (hek = HvNAME_HEK((HV*)sv)))
{
if (PL_stashcache) {
- DEBUG_o(Perl_deb(aTHX_ "sv_clear clearing PL_stashcache for '%"SVf"'\n",
- SVfARG(sv)));
+ DEBUG_o(Perl_deb(aTHX_
+ "sv_clear clearing PL_stashcache for '%"HEKf
+ "'\n",
+ HEKfARG(hek)));
(void)hv_deletehek(PL_stashcache,
- HvNAME_HEK((HV*)sv), G_DISCARD);
+ hek, G_DISCARD);
}
hv_name_set((HV*)sv, NULL, 0, 0);
}