diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-09-19 22:15:52 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-20 07:43:24 -0700 |
commit | 5988f3061bb4e71b2048c7b82f098bfa943a07d7 (patch) | |
tree | efab5dfbf2ae6da901391ce83f61f14e236866f1 /gv.c | |
parent | 365c7d0c5cb1cae07e9bacec13b5debcd4ead9eb (diff) | |
download | perl-5988f3061bb4e71b2048c7b82f098bfa943a07d7.tar.gz |
[perl #122799] Always turn off CvNAMED in cvgv-set
Instead of turning off the flag only when we need to turn it off
(when there is a hek, which is the only time it should be on), just
turn it off unconditionally.
This gets Scope::Upper working once more.
While it is arguably the module’s fault, it’s still a good idea to
make cvgv_set robust. CvNAMED should never be on after calling it,
regardless of the previous state of the CV.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -234,10 +234,10 @@ Perl_cvgv_set(pTHX_ CV* cv, GV* gv) } else if ((hek = CvNAME_HEK(cv))) { unshare_hek(hek); - CvNAMED_off(cv); CvLEXICAL_off(cv); } + CvNAMED_off(cv); SvANY(cv)->xcv_gv_u.xcv_gv = gv; assert(!CvCVGV_RC(cv)); |