diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-24 22:43:14 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-24 22:43:14 +0000 |
commit | 576df6af82aeb7ae6eeeb3e1a7c8a5514a7ed814 (patch) | |
tree | 7e77de3abdc889ca50d51dcf77a4ad654d4ada5f /scope.c | |
parent | dd38834bfe79dc631f1823deed588b23c6db62d5 (diff) | |
download | perl-576df6af82aeb7ae6eeeb3e1a7c8a5514a7ed814.tar.gz |
Given that SvPV on a typeglob is now irrelevant, really we only need
to store the GvGP.
p4raw-id: //depot/perl@27321
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -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)) |