This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv_taint() can easily be replaced by a macro.
[perl5.git] / sv.h
diff --git a/sv.h b/sv.h
index 1e6c86a..0fff609 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1034,6 +1034,8 @@ Taints an SV if tainting is enabled.
 =cut
 */
 
+#define sv_taint(sv)     sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0)
+
 #define SvTAINTED(sv)    (SvMAGICAL(sv) && sv_tainted(sv))
 #define SvTAINTED_on(sv)  STMT_START{ if(PL_tainting){sv_taint(sv);}   }STMT_END
 #define SvTAINTED_off(sv) STMT_START{ if(PL_tainting){sv_untaint(sv);} }STMT_END