summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-24 23:30:50 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-24 23:30:50 +0000
commitfb4fc1faf0cb0e6b2bec4f31ddbca2817f387a6e (patch)
tree2882197126adc1ab4e84763aaaa0757d81428e1d /scope.c
parent576df6af82aeb7ae6eeeb3e1a7c8a5514a7ed814 (diff)
downloadperl-fb4fc1faf0cb0e6b2bec4f31ddbca2817f387a6e.tar.gz
With PERL_DONT_CREATE_GVSV, don't need to create a new GvSV in
Perl_save_scalar. p4raw-id: //depot/perl@27322
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 827abe6ef8..ad7f14d7b1 100644
--- a/scope.c
+++ b/scope.c
@@ -181,7 +181,7 @@ SV *
Perl_save_scalar(pTHX_ GV *gv)
{
dVAR;
- SV ** const sptr = &GvSV(gv);
+ SV ** const sptr = &GvSVn(gv);
PL_localizing = 1;
SvGETMAGIC(*sptr);
PL_localizing = 0;
@@ -264,7 +264,9 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty)
IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
}
GvGP(gv) = gp_ref(gp);
+#ifndef PERL_DONT_CREATE_GVSV
GvSV(gv) = newSV(0);
+#endif
GvLINE(gv) = CopLINE(PL_curcop);
/* XXX Ideally this cast would be replaced with a change to const char*
in the struct. */