From: Nicholas Clark Date: Fri, 24 Feb 2006 23:30:50 +0000 (+0000) Subject: With PERL_DONT_CREATE_GVSV, don't need to create a new GvSV in X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb4fc1faf0cb0e6b2bec4f31ddbca2817f387a6e;p=p5sagit%2Fp5-mst-13.2.git With PERL_DONT_CREATE_GVSV, don't need to create a new GvSV in Perl_save_scalar. p4raw-id: //depot/perl@27322 --- diff --git a/scope.c b/scope.c index 827abe6..ad7f14d 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. */