summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-20 09:46:37 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-20 18:15:16 -0800
commit10507e11e7486d0edcd9599c75a5cb65d5db141a (patch)
tree71c4f4f3673a41ad06e7aa9321ee3851d433f312 /scope.c
parentd8906c052fcf764bce3ec89556a62718884c9ac4 (diff)
downloadperl-10507e11e7486d0edcd9599c75a5cb65d5db141a.tar.gz
Revert "Globs that are in the symbol table can be unglobbed"
This reverts b9e00b79 except for the tests. This extra checking and saving of the FAKE flag is no longer necessary as of the previous commit.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/scope.c b/scope.c
index 4a1b39933c..80846b6897 100644
--- a/scope.c
+++ b/scope.c
@@ -279,15 +279,7 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty)
PERL_ARGS_ASSERT_SAVE_GP;
- SSCHECK(4);
- SSPUSHINT(SvFAKE(gv));
- SSPUSHPTR(GvGP(gv));
- SSPUSHPTR(SvREFCNT_inc(gv));
- SSPUSHUV(SAVEt_GP);
-
- /* Don't let the localized GV coerce into non-glob, otherwise we would
- * not be able to restore GP upon leave from context if that happened */
- SvFAKE_off(gv);
+ save_pushptrptr(SvREFCNT_inc(gv), GvGP(gv), SAVEt_GP);
if (empty) {
GP *gp = Perl_newGP(aTHX_ gv);
@@ -853,11 +845,10 @@ Perl_leave_scope(pTHX_ I32 base)
*(AV**)ptr = MUTABLE_AV(SSPOPPTR);
break;
case SAVEt_GP: /* scalar reference */
+ ptr = SSPOPPTR;
gv = MUTABLE_GV(SSPOPPTR);
gp_free(gv);
- GvGP(gv) = (GP*)SSPOPPTR;
- if (SSPOPINT)
- SvFAKE_on(gv);
+ GvGP(gv) = (GP*)ptr;
/* putting a method back into circulation ("local")*/
if (GvCVu(gv) && (hv=GvSTASH(gv)) && HvENAME_get(hv))
mro_method_changed_in(hv);