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 /universal.c | |
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 'universal.c')
-rw-r--r-- | universal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/universal.c b/universal.c index c219411ed7..200ce875b9 100644 --- a/universal.c +++ b/universal.c @@ -302,7 +302,8 @@ C<croak()>. Hence if C<cv> is C<&ouch::awk>, it would call C<croak> as: void Perl_croak_xs_usage(const CV *const cv, const char *const params) { - const GV *const gv = CvGV(cv); + /* Avoid CvGV as it requires aTHX. */ + const GV *const gv = CvNAMED(cv) ? NULL : cv->sv_any->xcv_gv_u.xcv_gv; PERL_ARGS_ASSERT_CROAK_XS_USAGE; |