summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-10-18 18:07:19 +0000
committerNicholas Clark <nick@ccl4.org>2007-10-18 18:07:19 +0000
commit120f7abe0541f57e1b9cad739dd69b63bb352093 (patch)
treeec219233a03cfe4ce3ae8ff52ea54940ae656eb2 /mg.c
parent49a54bbe5e246f5f51e51453d9cc5a19e72a4433 (diff)
downloadperl-120f7abe0541f57e1b9cad739dd69b63bb352093.tar.gz
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
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mg.c b/mg.c
index 00b0c7156c..c4d7aeba5e 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') {