From: Nicholas Clark Date: Thu, 18 Oct 2007 18:07:19 +0000 (+0000) Subject: Simplify the logic for retrieving PL_inplace into $^I, as sv_setpv() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=120f7abe0541f57e1b9cad739dd69b63bb352093;p=p5sagit%2Fp5-mst-13.2.git Simplify the logic for retrieving PL_inplace into $^I, as sv_setpv() will do the "right" thing if we want NULL to map to undef. p4raw-id: //depot/perl@32137 --- diff --git a/mg.c b/mg.c index 00b0c71..c4d7aeb 100644 --- a/mg.c +++ b/mg.c @@ -782,10 +782,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) sv_setiv(sv, (IV)PL_hints); break; case '\011': /* ^I */ /* NOT \t in EBCDIC */ - if (PL_inplace) - sv_setpv(sv, PL_inplace); - else - sv_setsv(sv, &PL_sv_undef); + sv_setpv(sv, PL_inplace); /* Will undefine sv if PL_inplace is NULL */ break; case '\017': /* ^O & ^OPEN */ if (nextchar == '\0') {