diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-26 14:24:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-26 14:24:31 +0000 |
commit | 7423f6db106ad471398838e82e73b22d8c1e166e (patch) | |
tree | ab25b2b670e12e8d4ae54af8c7e216c47ef20c4a /op.c | |
parent | c4a9c09d5b30a93b6241aff3c9915e33e4e41eeb (diff) | |
download | perl-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 'op.c')
-rw-r--r-- | op.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1535,7 +1535,7 @@ S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs, bool for_my) ENTER; /* need to protect against side-effects of 'use' */ SAVEINT(PL_expect); if (stash) - stashsv = newSVpv(HvNAME_get(stash), 0); + stashsv = newSVpvn(HvNAME_get(stash), HvNAMELEN_get(stash)); else stashsv = &PL_sv_no; @@ -1588,7 +1588,7 @@ S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp) /* Build up the real arg-list. */ if (stash) - stashsv = newSVpv(HvNAME_get(stash), 0); + stashsv = newSVpvn(HvNAME_get(stash), HvNAMELEN_get(stash)); else stashsv = &PL_sv_no; arg = newOP(OP_PADSV, 0); |