summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-09-26 15:32:45 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:09 -0700
commitd527ce7c3632e2eaebee9f962268da87e0becd51 (patch)
treed551b090b0a7ee13caa0c2d68a8ce91901175afe /pp_ctl.c
parent1bac5ecc108e6bb05752e5aef66c6890163aff39 (diff)
downloadperl-d527ce7c3632e2eaebee9f962268da87e0becd51.tar.gz
pp_ctl.c: pp_caller UTF8 cleanup.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 03647236d7..2d8c4f2f5f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1869,7 +1869,7 @@ PP(pp_caller)
register const PERL_CONTEXT *cx;
const PERL_CONTEXT *dbcx;
I32 gimme;
- const char *stashname;
+ const HEK *stash_hek;
I32 count = 0;
bool has_arg = MAXARG && TOPs;
@@ -1888,14 +1888,14 @@ PP(pp_caller)
RETURN;
}
- stashname = CopSTASHPV(cx->blk_oldcop);
+ stash_hek = HvNAME_HEK((HV*)CopSTASH(cx->blk_oldcop));
if (GIMME != G_ARRAY) {
EXTEND(SP, 1);
- if (!stashname)
+ if (!stash_hek)
PUSHs(&PL_sv_undef);
else {
dTARGET;
- sv_setpv(TARG, stashname);
+ sv_sethek(TARG, stash_hek);
PUSHs(TARG);
}
RETURN;
@@ -1903,10 +1903,13 @@ PP(pp_caller)
EXTEND(SP, 11);
- if (!stashname)
+ if (!stash_hek)
PUSHs(&PL_sv_undef);
- else
- mPUSHs(newSVpv(stashname, 0));
+ else {
+ dTARGET;
+ sv_sethek(TARG, stash_hek);
+ PUSHTARG;
+ }
mPUSHs(newSVpv(OutCopFILE(cx->blk_oldcop), 0));
mPUSHi((I32)CopLINE(cx->blk_oldcop));
if (!has_arg)