summaryrefslogtreecommitdiff
path: root/xsutils.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-26 14:24:31 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-26 14:24:31 +0000
commit7423f6db106ad471398838e82e73b22d8c1e166e (patch)
treeab25b2b670e12e8d4ae54af8c7e216c47ef20c4a /xsutils.c
parentc4a9c09d5b30a93b6241aff3c9915e33e4e41eeb (diff)
downloadperl-7423f6db106ad471398838e82e73b22d8c1e166e.tar.gz
Store the package name as a shared HEK.
Abolish HvNAME() - as the stored pointer is not a char* you can't set it directly now. Storing a pointer to a HEK tracks the length too, and seems to be faster. p4raw-id: //depot/perl@24584
Diffstat (limited to 'xsutils.c')
-rw-r--r--xsutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xsutils.c b/xsutils.c
index 7cdf41a63f..7b968cf625 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -258,7 +258,7 @@ usage:
sv = SvRV(rv);
if (SvOBJECT(sv))
- sv_setpv(TARG, HvNAME_get(SvSTASH(sv)));
+ sv_setpvn(TARG, HvNAME_get(SvSTASH(sv)), HvNAMELEN_get(SvSTASH(sv)));
#if 0 /* this was probably a bad idea */
else if (SvPADMY(sv))
sv_setsv(TARG, &PL_sv_no); /* unblessed lexical */
@@ -284,7 +284,7 @@ usage:
break;
}
if (stash)
- sv_setpv(TARG, HvNAME_get(stash));
+ sv_setpvn(TARG, HvNAME_get(stash), HvNAMELEN_get(stash));
}
SvSETMAGIC(TARG);