summaryrefslogtreecommitdiff
path: root/pp.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 /pp.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 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 2a543b3b34..f63b372edf 100644
--- a/pp.c
+++ b/pp.c
@@ -601,7 +601,8 @@ PP(pp_gelem)
case 'P':
if (strEQ(elem2, "ACKAGE")) {
const char *name = HvNAME_get(GvSTASH(gv));
- sv = newSVpv(name ? name : "__ANON__", 0);
+ sv = newSVpvn(name ? name : "__ANON__",
+ name ? HvNAMELEN_get(GvSTASH(gv)) : 8);
}
break;
case 'S':