summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-28 18:26:36 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-15 06:19:32 -0700
commitae77754ae288180ef1b6bab63dd49fa724d9fddd (patch)
tree2117fa17eff09c3b743f144a60d16c352c152bcd /universal.c
parente38faec93a3dca999da366b2f1cec7a005c2b41b (diff)
downloadperl-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.c3
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;