diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-03 12:41:11 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:45:05 -0700 |
commit | 2e800d795e15b864092072119d45b4d3b18b4c88 (patch) | |
tree | 3a26ed24f78ac44e0583caa579ea9878f1016877 /pad.c | |
parent | 6d5c21479838db78689e08afd075ef4e9100ef0d (diff) | |
download | perl-2e800d795e15b864092072119d45b4d3b18b4c88.tar.gz |
CvNAME_HEK_set
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -381,8 +381,7 @@ Perl_cv_undef(pTHX_ CV *cv) #endif SvPOK_off(MUTABLE_SV(cv)); /* forget prototype */ sv_unmagic((SV *)cv, PERL_MAGIC_checkcall); - if (CvNAMED(cv)) unshare_hek(CvNAME_HEK(cv)), - SvANY(cv)->xcv_gv_u.xcv_hek = NULL; + if (CvNAMED(cv)) CvNAME_HEK_set(cv, NULL); else CvGV_set(cv, NULL); /* This statement and the subsequence if block was pad_undef(). */ @@ -2071,9 +2070,8 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside) assert(SvTYPE(ppad[ix]) == SVt_PVCV); assert(CvNAME_HEK((CV *)ppad[ix])); sv = newSV_type(SVt_PVCV); - SvANY((CV *)sv)->xcv_gv_u.xcv_hek = - share_hek_hek(CvNAME_HEK((CV *)ppad[ix])); - CvNAMED_on(sv); + CvNAME_HEK_set(sv, + share_hek_hek(CvNAME_HEK((CV *)ppad[ix]))); sv_magic(sv,mg->mg_obj,PERL_MAGIC_proto,NULL,0); } else sv = SvREFCNT_inc(ppad[ix]); @@ -2123,10 +2121,7 @@ S_cv_clone(pTHX_ CV *proto, CV *cv, CV *outside) CvFILE(cv) = CvDYNFILE(proto) ? savepv(CvFILE(proto)) : CvFILE(proto); if (CvNAMED(proto)) - { - SvANY(cv)->xcv_gv_u.xcv_hek = share_hek_hek(CvNAME_HEK(proto)); - CvNAMED_on(cv); - } + CvNAME_HEK_set(cv, share_hek_hek(CvNAME_HEK(proto))); else CvGV_set(cv,CvGV(proto)); CvSTASH_set(cv, CvSTASH(proto)); OP_REFCNT_LOCK; |