summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-24 22:43:14 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-24 22:43:14 +0000
commit576df6af82aeb7ae6eeeb3e1a7c8a5514a7ed814 (patch)
tree7e77de3abdc889ca50d51dcf77a4ad654d4ada5f /scope.c
parentdd38834bfe79dc631f1823deed588b23c6db62d5 (diff)
downloadperl-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.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/scope.c b/scope.c
index 8f7383a21d..827abe6ef8 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))