From: Nicholas Clark Date: Fri, 24 Feb 2006 22:43:14 +0000 (+0000) Subject: Given that SvPV on a typeglob is now irrelevant, really we only need X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=576df6af82aeb7ae6eeeb3e1a7c8a5514a7ed814;p=p5sagit%2Fp5-mst-13.2.git Given that SvPV on a typeglob is now irrelevant, really we only need to store the GvGP. p4raw-id: //depot/perl@27321 --- diff --git a/scope.c b/scope.c index 8f7383a..827abe6 100644 --- a/scope.c +++ b/scope.c @@ -247,12 +247,7 @@ void Perl_save_gp(pTHX_ GV *gv, I32 empty) { dVAR; - SSGROW(6); - SSPUSHIV((IV)SvLEN(gv)); - SvLEN_set(gv, 0); /* forget that anything was allocated here */ - SSPUSHIV((IV)SvCUR(gv)); - SSPUSHPTR(SvPVX_const(gv)); - SvPOK_off(gv); + SSGROW(3); SSPUSHPTR(SvREFCNT_inc(gv)); SSPUSHPTR(GvGP(gv)); SSPUSHINT(SAVEt_GP); @@ -723,12 +718,6 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_GP: /* scalar reference */ ptr = SSPOPPTR; gv = (GV*)SSPOPPTR; - if (SvPVX_const(gv) && SvLEN(gv) > 0) { - Safefree(SvPVX_mutable(gv)); - } - SvPV_set(gv, (char *)SSPOPPTR); - SvCUR_set(gv, (STRLEN)SSPOPIV); - SvLEN_set(gv, (STRLEN)SSPOPIV); gp_free(gv); GvGP(gv) = (GP*)ptr; if (GvCVu(gv))