From 10507e11e7486d0edcd9599c75a5cb65d5db141a Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 20 Nov 2010 09:46:37 -0800 Subject: 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. --- scope.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'scope.c') 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); -- cgit v1.2.1