summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-10-08 13:00:14 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-08 21:10:49 +0000
commit7c36658b988154cf97fb44e48a4b69859fe075fb (patch)
tree5c939a5aaf82b6ae8284451a698a7174bfb22152 /mg.c
parent9b6f56add0290d5abf1a0544e71e01681e6e1beb (diff)
downloadperl-7c36658b988154cf97fb44e48a4b69859fe075fb.tar.gz
Re: [PATCH mg.c gv.c and others] ${^TAINT}
Message-ID: <20011008170014.L17083@blackrider> p4raw-id: //depot/perl@12367
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mg.c b/mg.c
index 0fb1a86d5e..4e186e0c5f 100644
--- a/mg.c
+++ b/mg.c
@@ -612,12 +612,16 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
}
break;
case '\024': /* ^T */
+ if (*(mg->mg_ptr+1) == '\0') {
#ifdef BIG_TIME
- sv_setnv(sv, PL_basetime);
+ sv_setnv(sv, PL_basetime);
#else
- sv_setiv(sv, (IV)PL_basetime);
+ sv_setiv(sv, (IV)PL_basetime);
#endif
- break;
+ }
+ else if (strEQ(mg->mg_ptr, "\024AINT"))
+ sv_setiv(sv, PL_tainting);
+ break;
case '\027': /* ^W & $^WARNING_BITS & ^WIDE_SYSTEM_CALLS */
if (*(mg->mg_ptr+1) == '\0')
sv_setiv(sv, (IV)((PL_dowarn & G_WARN_ON) ? TRUE : FALSE));