diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-08-28 18:26:36 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-15 06:19:32 -0700 |
commit | ae77754ae288180ef1b6bab63dd49fa724d9fddd (patch) | |
tree | 2117fa17eff09c3b743f144a60d16c352c152bcd /inline.h | |
parent | e38faec93a3dca999da366b2f1cec7a005c2b41b (diff) | |
download | perl-ae77754ae288180ef1b6bab63dd49fa724d9fddd.tar.gz |
For lexical subs, reify CvGV from CvSTASH and CvNAME_HEK
From now on, the presence of a name hek implies a GV. Any access to
CvGV will cause that implicit GV to be reified.
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -25,6 +25,14 @@ S_av_top_index(pTHX_ AV *av) /* ------------------------------- cv.h ------------------------------- */ +PERL_STATIC_INLINE GV * +S_CvGV(pTHX_ CV *sv) +{ + return CvNAMED(sv) + ? Perl_cvgv_from_hek(aTHX_ sv) + : ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_gv_u.xcv_gv; +} + PERL_STATIC_INLINE I32 * S_CvDEPTHp(const CV * const sv) { |